diff options
author | Ken Moore <ken@pcbsd.org> | 2015-02-17 12:16:22 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-02-17 12:16:22 -0500 |
commit | 6317af9ee1964a7f636b977541b447cbdfd4eaac (patch) | |
tree | aa52ad31c08cd8b8e920b29e218538b6f3b8892d /lumina-config | |
parent | Add the ability to "reset" an application back to defaults in lumina-config -... (diff) | |
download | lumina-6317af9ee1964a7f636b977541b447cbdfd4eaac.tar.gz lumina-6317af9ee1964a7f636b977541b447cbdfd4eaac.tar.bz2 lumina-6317af9ee1964a7f636b977541b447cbdfd4eaac.zip |
Fix some panel interactions.
1) Found/fixed a bug with a panel mis-reporting which number it was.
2) Clean up the panel interface management in lumina-config.
Diffstat (limited to 'lumina-config')
-rw-r--r-- | lumina-config/mainUI.cpp | 37 | ||||
-rw-r--r-- | lumina-config/mainUI.ui | 24 |
2 files changed, 29 insertions, 32 deletions
diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp index c5a0c934..affa3921 100644 --- a/lumina-config/mainUI.cpp +++ b/lumina-config/mainUI.cpp @@ -810,57 +810,54 @@ void MainUI::panelValChanged(){ void MainUI::addpanel1(){ ui->toolBox_panel1->setVisible(true); + panelnumber = 1; checkpanels(); ui->push_save->setEnabled(true); modpan = true; - panelnumber = 1; } void MainUI::addpanel2(){ ui->toolBox_panel2->setVisible(true); + panelnumber = 2; checkpanels(); ui->push_save->setEnabled(true); modpan = true; - panelnumber = 2; } void MainUI::rmpanel1(){ ui->toolBox_panel1->setVisible(false); + panelnumber = 0; checkpanels(); ui->push_save->setEnabled(true); modpan = true; - panelnumber = 0; } void MainUI::rmpanel2(){ ui->toolBox_panel2->setVisible(false); + panelnumber = 1; checkpanels(); ui->push_save->setEnabled(true); modpan = true; - panelnumber = 1; } void MainUI::checkpanels(){ //This checks the primary panel buttons/visibility - ui->tool_panel1_add->setVisible(!ui->toolBox_panel1->isVisible()); - ui->tool_panel1_rm->setVisible(ui->toolBox_panel1->isVisible()); - if(ui->tool_panel1_add->isVisible()){ - //No panels at all yet - disable the 2nd panel options - ui->tool_panel2_add->setVisible(false); - ui->tool_panel2_rm->setVisible(false); - ui->toolBox_panel2->setVisible(false); - ui->label_panel2->setVisible(false); + //panel 1 + ui->tool_panel1_add->setVisible(panelnumber < 1); + ui->tool_panel1_rm->setVisible(panelnumber == 1); + ui->toolBox_panel1->setVisible(panelnumber>0); + //panel1 label is always visible + //panel 2 + ui->tool_panel2_add->setVisible(panelnumber==1); + ui->tool_panel2_rm->setVisible(panelnumber>1); + ui->toolBox_panel2->setVisible(panelnumber>1); + ui->label_panel2->setVisible(panelnumber>0); + + //Sizing/layout fix for side-by-side vertical layouts + if(panelnumber<1){ ui->gridLayout_panels->setColumnStretch(2,1); - panelnumber = 0; //no panels at the moment }else{ - //Panel 1 is visible - also show options for panel 2 appropriately - ui->tool_panel2_add->setVisible(!ui->toolBox_panel2->isVisible()); - ui->tool_panel2_rm->setVisible(ui->toolBox_panel2->isVisible()); - ui->label_panel2->setVisible(true); - ui->tool_panel1_rm->setVisible(!ui->toolBox_panel2->isVisible()); ui->gridLayout_panels->setColumnStretch(2,0); - if(ui->tool_panel2_add->isVisible()){ panelnumber = 1; } - else{panelnumber = 2; } } } diff --git a/lumina-config/mainUI.ui b/lumina-config/mainUI.ui index dcdc4d12..fcebaff7 100644 --- a/lumina-config/mainUI.ui +++ b/lumina-config/mainUI.ui @@ -9,8 +9,8 @@ <rect> <x>0</x> <y>0</y> - <width>579</width> - <height>424</height> + <width>596</width> + <height>442</height> </rect> </property> <property name="windowTitle"> @@ -109,7 +109,7 @@ <enum>QFrame::StyledPanel</enum> </property> <property name="currentIndex"> - <number>4</number> + <number>1</number> </property> <widget class="QWidget" name="page_desktop"> <layout class="QVBoxLayout" name="verticalLayout_3"> @@ -374,7 +374,7 @@ <item> <widget class="QTabWidget" name="tabWidget_panels"> <property name="currentIndex"> - <number>0</number> + <number>1</number> </property> <widget class="QWidget" name="tab_desktopInterface"> <attribute name="title"> @@ -536,7 +536,7 @@ <attribute name="title"> <string>Panels</string> </attribute> - <layout class="QGridLayout" name="gridLayout_panels"> + <layout class="QGridLayout" name="gridLayout_panels" rowstretch="0,1" columnstretch="0,0"> <item row="0" column="1"> <layout class="QHBoxLayout" name="horizontalLayout_9"> <item> @@ -602,8 +602,8 @@ <rect> <x>0</x> <y>0</y> - <width>233</width> - <height>150</height> + <width>263</width> + <height>178</height> </rect> </property> <attribute name="label"> @@ -799,8 +799,8 @@ <rect> <x>0</x> <y>0</y> - <width>233</width> - <height>150</height> + <width>263</width> + <height>178</height> </rect> </property> <attribute name="label"> @@ -1771,8 +1771,8 @@ <rect> <x>0</x> <y>0</y> - <width>493</width> - <height>89</height> + <width>128</width> + <height>28</height> </rect> </property> <property name="sizePolicy"> @@ -1890,7 +1890,7 @@ <rect> <x>0</x> <y>0</y> - <width>579</width> + <width>596</width> <height>19</height> </rect> </property> |