diff options
author | Ken Moore <ken@ixsystems.com> | 2017-06-07 10:28:26 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-06-07 10:28:26 -0400 |
commit | fa170a25575cf15c766f44820c422d90ec5a9735 (patch) | |
tree | 473ce0835fce2062fc72bd790037c500dc113445 /src-qt5/core-utils/lumina-config | |
parent | Get the auto-extract functionality cleaned up with the signal/slots a bit. (diff) | |
download | lumina-fa170a25575cf15c766f44820c422d90ec5a9735.tar.gz lumina-fa170a25575cf15c766f44820c422d90ec5a9735.tar.bz2 lumina-fa170a25575cf15c766f44820c422d90ec5a9735.zip |
Deactivate the auto-resize functionality (for now) with a comment about the Fluxbox issue.
This can get reactivated when Fluxbox is deactivated with Lumina 2.0.
Instead, just increase the default size of the main window a bit.
Diffstat (limited to 'src-qt5/core-utils/lumina-config')
5 files changed, 27 insertions, 6 deletions
diff --git a/src-qt5/core-utils/lumina-config/mainWindow.cpp b/src-qt5/core-utils/lumina-config/mainWindow.cpp index 8b021d35..3e843354 100644 --- a/src-qt5/core-utils/lumina-config/mainWindow.cpp +++ b/src-qt5/core-utils/lumina-config/mainWindow.cpp @@ -26,7 +26,7 @@ mainWindow::mainWindow() : QMainWindow(), ui(new Ui::mainWindow()){ backShortcut = new QShortcut(Qt::Key_Escape, this); connect(backShortcut, SIGNAL(activated()), this, SLOT(on_actionBack_triggered()) ); quitShortcut = new QShortcut(Qt::CTRL + Qt::Key_Q, this); - connect(quitShortcut, SIGNAL(activated()), this, SLOT(on_quitShortcut_Triggered()) ); + connect(quitShortcut, SIGNAL(activated()), this, SLOT(quitShortcut_Triggered()) ); setupIcons(); loadMonitors(); //changePage(""); //load the default main page @@ -109,7 +109,6 @@ void mainWindow::changePage(QString id){ page->setPreviousPage(oldpage); //Now update this UI a bit based on page settings ui->actionMonitor->setVisible( page->needsScreenSelector() && ui->actionMonitor->menu()->actions().length()>1 ); - this->showNormal(); } //================ @@ -147,7 +146,7 @@ void mainWindow::on_actionBack_triggered(){ else{ page_change(""); } //Use the interactive wrapper (check for save state, etc). } -void mainWindow::on_quitShortcut_Triggered(){ +void mainWindow::quitShortcut_Triggered(){ QApplication::quit(); } diff --git a/src-qt5/core-utils/lumina-config/mainWindow.h b/src-qt5/core-utils/lumina-config/mainWindow.h index 2873ecdb..958daff9 100644 --- a/src-qt5/core-utils/lumina-config/mainWindow.h +++ b/src-qt5/core-utils/lumina-config/mainWindow.h @@ -41,6 +41,6 @@ private slots: void on_actionSave_triggered(); void on_actionBack_triggered(); void changeMonitor(QAction*); - void on_quitShortcut_Triggered(); + void quitShortcut_Triggered(); }; #endif diff --git a/src-qt5/core-utils/lumina-config/mainWindow.ui b/src-qt5/core-utils/lumina-config/mainWindow.ui index 0a9f6896..70e9895c 100644 --- a/src-qt5/core-utils/lumina-config/mainWindow.ui +++ b/src-qt5/core-utils/lumina-config/mainWindow.ui @@ -6,8 +6,8 @@ <rect> <x>0</x> <y>0</y> - <width>504</width> - <height>388</height> + <width>550</width> + <height>400</height> </rect> </property> <property name="windowTitle"> 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> |