aboutsummaryrefslogtreecommitdiff
path: root/lumina-config
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-10-23 19:32:20 -0400
committerKen Moore <ken@pcbsd.org>2014-10-23 19:32:20 -0400
commitcc9271feae33e882154d2cffc9579316a04fac2c (patch)
treeb33777fe6c09f34162d9672a2b6091294c637e51 /lumina-config
parentFix the auto-loading of the Lumina wallpapers directory in lumina-config. (diff)
downloadlumina-cc9271feae33e882154d2cffc9579316a04fac2c.tar.gz
lumina-cc9271feae33e882154d2cffc9579316a04fac2c.tar.bz2
lumina-cc9271feae33e882154d2cffc9579316a04fac2c.zip
Add the auto-hide ability for the Lumina panels (and add a configuration option for it to lumina-config). If selected, this will only leave a 2-pixel thick "edge" of the panel on the screen that will expand out to the full panel when moused-over.
Diffstat (limited to 'lumina-config')
-rw-r--r--lumina-config/mainUI.cpp16
-rw-r--r--lumina-config/mainUI.h1
-rw-r--r--lumina-config/mainUI.ui38
3 files changed, 41 insertions, 14 deletions
diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp
index 937cfcb5..3655b4a8 100644
--- a/lumina-config/mainUI.cpp
+++ b/lumina-config/mainUI.cpp
@@ -154,8 +154,10 @@ void MainUI::setupConnections(){
connect(ui->toolBox_panel2, SIGNAL(currentChanged(int)), this, SLOT(adjustpanel1()) );
connect(ui->combo_panel1_loc, SIGNAL(currentIndexChanged(int)), this, SLOT(adjustpanel2()) );
connect(ui->combo_panel2_loc, SIGNAL(currentIndexChanged(int)), this, SLOT(adjustpanel1()) );
- connect(ui->spin_panel1_size, SIGNAL(valueChanged(int)), this, SLOT(adjustpanel2()) );
- connect(ui->spin_panel2_size, SIGNAL(valueChanged(int)), this, SLOT(adjustpanel1()) );
+ connect(ui->spin_panel1_size, SIGNAL(valueChanged(int)), this, SLOT(panelValChanged()) );
+ connect(ui->spin_panel2_size, SIGNAL(valueChanged(int)), this, SLOT(panelValChanged()) );
+ connect(ui->check_panel1_hidepanel, SIGNAL(clicked()), this, SLOT(panelValChanged()) );
+ connect(ui->check_panel2_hidepanel, SIGNAL(clicked()), this, SLOT(panelValChanged()) );
connect(ui->tool_panel1_addplugin, SIGNAL(clicked()), this, SLOT(addpanel1plugin()) );
connect(ui->tool_panel1_rmplugin, SIGNAL(clicked()), this, SLOT(rmpanel1plugin()) );
connect(ui->tool_panel1_upplug, SIGNAL(clicked()), this, SLOT(uppanel1plugin()) );
@@ -446,6 +448,7 @@ void MainUI::loadCurrentSettings(bool screenonly){
QString PPrefix = "panel"+QString::number(cdesk)+".0/";
ui->toolBox_panel1->setVisible(true);
ui->spin_panel1_size->setValue( settings->value( PPrefix+"height",30).toInt() );
+ ui->check_panel1_hidepanel->setChecked( settings->value(PPrefix+"hidepanel", false).toBool() );
QString loc = settings->value(PPrefix+"location","top").toString().toLower();
if(loc=="top"){ ui->combo_panel1_loc->setCurrentIndex(0); }
else if(loc=="bottom"){ ui->combo_panel1_loc->setCurrentIndex(1); }
@@ -471,6 +474,7 @@ void MainUI::loadCurrentSettings(bool screenonly){
//Panel 1 defaults
ui->toolBox_panel1->setVisible(false); //not initially visible
ui->spin_panel1_size->setValue(30);
+ ui->check_panel1_hidepanel->setChecked( false );
ui->combo_panel1_loc->setCurrentIndex(0); //Top
ui->list_panel1_plugins->clear();
ui->label_panel1_sample->setWhatsThis("rgba(255,255,255,160)");
@@ -481,6 +485,7 @@ void MainUI::loadCurrentSettings(bool screenonly){
ui->toolBox_panel2->setVisible(true);
QString PPrefix = "panel"+QString::number(cdesk)+".1/";
ui->spin_panel2_size->setValue( settings->value( PPrefix+"height",30).toInt() );
+ ui->check_panel2_hidepanel->setChecked( settings->value(PPrefix+"hidepanel", false).toBool() );
QString loc = settings->value(PPrefix+"location","top").toString().toLower();
if(loc=="top"){ ui->combo_panel2_loc->setCurrentIndex(0); }
else if(loc=="bottom"){ ui->combo_panel2_loc->setCurrentIndex(1); }
@@ -505,6 +510,7 @@ void MainUI::loadCurrentSettings(bool screenonly){
//Panel 2 defaults
ui->toolBox_panel2->setVisible(false); //not initially visible
ui->spin_panel2_size->setValue(30);
+ ui->check_panel2_hidepanel->setChecked( false );
ui->combo_panel2_loc->setCurrentIndex(1); //Bottom
ui->list_panel2_plugins->clear();
ui->label_panel2_sample->setWhatsThis("rgba(255,255,255,160)");
@@ -589,6 +595,7 @@ void MainUI::saveCurrentSettings(bool screenonly){
QString PPrefix = "panel"+QString::number(currentDesktop())+".0/";
settings->setValue(PPrefix+"color", ui->label_panel1_sample->whatsThis());
settings->setValue(PPrefix+"height", ui->spin_panel1_size->value());
+ settings->setValue(PPrefix+"hidepanel", ui->check_panel1_hidepanel->isChecked());
int loc = ui->combo_panel1_loc->currentIndex();
if(loc==0){ settings->setValue(PPrefix+"location", "top"); }
else if(loc==1){ settings->setValue(PPrefix+"location", "bottom"); }
@@ -609,6 +616,7 @@ void MainUI::saveCurrentSettings(bool screenonly){
QString PPrefix = "panel"+QString::number(currentDesktop())+".1/";
settings->setValue(PPrefix+"color", ui->label_panel2_sample->whatsThis());
settings->setValue(PPrefix+"height", ui->spin_panel2_size->value());
+ settings->setValue(PPrefix+"hidepanel", ui->check_panel2_hidepanel->isChecked());
int loc = ui->combo_panel2_loc->currentIndex();
if(loc==0){ settings->setValue(PPrefix+"location", "top"); }
else if(loc==1){ settings->setValue(PPrefix+"location", "bottom"); }
@@ -762,6 +770,10 @@ void MainUI::deskplugadded(){
//=============
// PANELS PAGE
//=============
+void MainUI::panelValChanged(){
+ if(!loading){ ui->push_save->setEnabled(true); modpan = true; }
+}
+
void MainUI::addpanel1(){
ui->toolBox_panel1->setVisible(true);
checkpanels();
diff --git a/lumina-config/mainUI.h b/lumina-config/mainUI.h
index 0031a45f..12df6fde 100644
--- a/lumina-config/mainUI.h
+++ b/lumina-config/mainUI.h
@@ -100,6 +100,7 @@ private slots:
//Panels Page
+ void panelValChanged();
void addpanel1();
void addpanel2();
void rmpanel1();
diff --git a/lumina-config/mainUI.ui b/lumina-config/mainUI.ui
index 7f8f2ae8..9489523a 100644
--- a/lumina-config/mainUI.ui
+++ b/lumina-config/mainUI.ui
@@ -91,7 +91,7 @@
<enum>QFrame::StyledPanel</enum>
</property>
<property name="currentIndex">
- <number>5</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="page_desktop">
<layout class="QVBoxLayout" name="verticalLayout_3">
@@ -369,8 +369,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>157</width>
- <height>90</height>
+ <width>265</width>
+ <height>168</height>
</rect>
</property>
<attribute name="label">
@@ -444,6 +444,13 @@
</item>
</layout>
</item>
+ <item row="3" column="1">
+ <widget class="QCheckBox" name="check_panel2_hidepanel">
+ <property name="text">
+ <string>Auto-hide Panel </string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<widget class="QWidget" name="page_panel2_plugins">
@@ -451,8 +458,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>177</width>
- <height>106</height>
+ <width>191</width>
+ <height>107</height>
</rect>
</property>
<attribute name="label">
@@ -589,8 +596,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>157</width>
- <height>90</height>
+ <width>266</width>
+ <height>168</height>
</rect>
</property>
<attribute name="label">
@@ -664,6 +671,13 @@
</item>
</layout>
</item>
+ <item row="3" column="1">
+ <widget class="QCheckBox" name="check_panel1_hidepanel">
+ <property name="text">
+ <string>Auto-hide Panel </string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
<widget class="QWidget" name="page_panel1_plugins">
@@ -671,8 +685,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>177</width>
- <height>106</height>
+ <width>191</width>
+ <height>107</height>
</rect>
</property>
<attribute name="label">
@@ -1391,8 +1405,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>515</width>
- <height>78</height>
+ <width>129</width>
+ <height>16</height>
</rect>
</property>
<property name="sizePolicy">
@@ -1499,7 +1513,7 @@
<x>0</x>
<y>0</y>
<width>579</width>
- <height>20</height>
+ <height>21</height>
</rect>
</property>
</widget>
bgstack15