mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-14 19:12:11 +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()
|
void SearchEnginesDialog::accept()
|
||||||
{
|
{
|
||||||
if (ui->treeWidget->topLevelItemCount() < 1) {
|
if (ui->treeWidget->topLevelItemCount() < 1) {
|
||||||
|
|
|
@ -63,6 +63,10 @@ private:
|
||||||
|
|
||||||
void reloadEngines();
|
void reloadEngines();
|
||||||
|
|
||||||
|
void showEvent(QShowEvent *e) override;
|
||||||
|
void resizeEvent(QResizeEvent *e) override;
|
||||||
|
void resizeViewHeader();
|
||||||
|
|
||||||
Ui::SearchEnginesDialog* ui;
|
Ui::SearchEnginesDialog* ui;
|
||||||
SearchEnginesManager* m_manager;
|
SearchEnginesManager* m_manager;
|
||||||
};
|
};
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="headerDefaultSectionSize">
|
<attribute name="headerDefaultSectionSize">
|
||||||
<number>200</number>
|
<number>0</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user