diff options
Diffstat (limited to 'src-qt5/core-utils/lumina-config/pages')
-rw-r--r-- | src-qt5/core-utils/lumina-config/pages/page_main.cpp | 13 | ||||
-rw-r--r-- | src-qt5/core-utils/lumina-config/pages/page_main.ui | 9 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src-qt5/core-utils/lumina-config/pages/page_main.cpp b/src-qt5/core-utils/lumina-config/pages/page_main.cpp index 45c03ef9..13a3cfbd 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_main.cpp +++ b/src-qt5/core-utils/lumina-config/pages/page_main.cpp @@ -123,6 +123,19 @@ void page_main::UpdateItems(QString search){ ui->treeWidget->sortItems(0, Qt::AscendingOrder); ui->treeWidget->resizeColumnToContents(0); ui->treeWidget->resizeColumnToContents(1); + + //Now make sure the width of the tree widget is greater/equal to the recommended size + int wid = ui->treeWidget->indentation() + 10; + for(int i=0; i<ui->treeWidget->columnCount(); i++){ + wid += ui->treeWidget->columnWidth(i); + } + if(wid < ui->treeWidget->header()->width() ){ wid = ui->treeWidget->header()->width(); } + //qDebug() << "Current size:" << ui->treeWidget->size() << ui->treeWidget->header()->width() << wid; + if(ui->treeWidget->size().width() < wid ){ + // ENABLE LATER WITH LUMINA 2.0 - Fluxbox does not like it when a window gets resized near the init routine + // and moves the window slightly-offscreen (titlebar hidden) + //ui->treeWidget->setMinimumWidth( wid ); + } } //================ diff --git a/src-qt5/core-utils/lumina-config/pages/page_main.ui b/src-qt5/core-utils/lumina-config/pages/page_main.ui index 34033d39..07e5a5cd 100644 --- a/src-qt5/core-utils/lumina-config/pages/page_main.ui +++ b/src-qt5/core-utils/lumina-config/pages/page_main.ui @@ -41,6 +41,12 @@ <property name="styleSheet"> <string notr="true">QTreeWidget{background: transparent; }</string> </property> + <property name="horizontalScrollBarPolicy"> + <enum>Qt::ScrollBarAsNeeded</enum> + </property> + <property name="sizeAdjustPolicy"> + <enum>QAbstractScrollArea::AdjustToContents</enum> + </property> <property name="editTriggers"> <set>QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set> </property> @@ -59,6 +65,9 @@ <height>32</height> </size> </property> + <property name="horizontalScrollMode"> + <enum>QAbstractItemView::ScrollPerItem</enum> + </property> <property name="indentation"> <number>20</number> </property> |