mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
SearchEnginesDialog: Set sensible size for columns
This commit is contained in:
parent
a5002d9311
commit
f225399739
|
@ -229,6 +229,24 @@ void SearchEnginesDialog::reloadEngines()
|
|||
}
|
||||
}
|
||||
|
||||
void SearchEnginesDialog::showEvent(QShowEvent *e)
|
||||
{
|
||||
QDialog::showEvent(e);
|
||||
resizeViewHeader();
|
||||
}
|
||||
|
||||
void SearchEnginesDialog::resizeEvent(QResizeEvent *e)
|
||||
{
|
||||
QDialog::resizeEvent(e);
|
||||
resizeViewHeader();
|
||||
}
|
||||
|
||||
void SearchEnginesDialog::resizeViewHeader()
|
||||
{
|
||||
const int headerWidth = ui->treeWidget->header()->width();
|
||||
ui->treeWidget->header()->resizeSection(0, headerWidth - headerWidth / 4);
|
||||
}
|
||||
|
||||
void SearchEnginesDialog::accept()
|
||||
{
|
||||
if (ui->treeWidget->topLevelItemCount() < 1) {
|
||||
|
|
|
@ -63,6 +63,10 @@ private:
|
|||
|
||||
void reloadEngines();
|
||||
|
||||
void showEvent(QShowEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
void resizeViewHeader();
|
||||
|
||||
Ui::SearchEnginesDialog* ui;
|
||||
SearchEnginesManager* m_manager;
|
||||
};
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="headerDefaultSectionSize">
|
||||
<number>200</number>
|
||||
<number>0</number>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
|
|
Loading…
Reference in New Issue
Block a user