summaryrefslogtreecommitdiff
path: root/noncore/styles/liquid/settings/liquidset.cpp
Side-by-side diff
Diffstat (limited to 'noncore/styles/liquid/settings/liquidset.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/settings/liquidset.cpp55
1 files changed, 45 insertions, 10 deletions
diff --git a/noncore/styles/liquid/settings/liquidset.cpp b/noncore/styles/liquid/settings/liquidset.cpp
index 0ef5dbe..1479ac0 100644
--- a/noncore/styles/liquid/settings/liquidset.cpp
+++ b/noncore/styles/liquid/settings/liquidset.cpp
@@ -46,2 +46,3 @@ static void changeButtonColor ( QWidget *btn, const QColor &col )
+ pal. setColor ( QPalette::Normal, QColorGroup::Button, col );
pal. setColor ( QPalette::Active, QColorGroup::Button, col );
@@ -49,2 +50,6 @@ static void changeButtonColor ( QWidget *btn, const QColor &col )
pal. setColor ( QPalette::Inactive, QColorGroup::Button, col );
+ pal. setColor ( QPalette::Normal, QColorGroup::Background, col );
+ pal. setColor ( QPalette::Active, QColorGroup::Background, col );
+ pal. setColor ( QPalette::Disabled, QColorGroup::Background, col );
+ pal. setColor ( QPalette::Inactive, QColorGroup::Background, col );
@@ -60,9 +65,11 @@ LiquidSet::LiquidSet ( QWidget* parent, const char *name, WFlags fl )
Config config ( "qpe" );
- config. setGroup ( "MosfetMenus" );
+ config. setGroup ( "Liquid-Style" );
- m_type = config. readNumEntry ( "Type", TransStippleBg );
- m_menucol = QColor ( config. readEntry ( "Color", QApplication::palette ( ). active ( ). button ( ). name ( )));
- m_textcol = QColor ( config. readEntry ( "TextColor", QApplication::palette ( ). active ( ). text ( ). name ( )));
- int opacity = config. readNumEntry ( "Opacity", 10 );
- m_shadow = config. readBoolEntry ( "ShadowText", true );
+ m_type = config. readNumEntry ( "Type", TransStippleBg );
+ m_menucol = QColor ( config. readEntry ( "Color", QApplication::palette ( ). active ( ). button ( ). name ( )));
+ m_textcol = QColor ( config. readEntry ( "TextColor", QApplication::palette ( ). active ( ). text ( ). name ( )));
+ int opacity = config. readNumEntry ( "Opacity", 10 );
+ m_shadow = config. readBoolEntry ( "ShadowText", true );
+ m_deco = config. readBoolEntry ( "WinDecoration", true );
+ int contrast = config. readNumEntry ( "StippleContrast", 5 );
@@ -140,3 +147,3 @@ LiquidSet::LiquidSet ( QWidget* parent, const char *name, WFlags fl )
- QCheckBox *shadow = new QCheckBox ( tr( "Use shadowed text" ), this );
+ QCheckBox *shadow = new QCheckBox ( tr( "Use shadowed menu text" ), this );
shadow-> setChecked ( m_shadow );
@@ -144,3 +151,23 @@ LiquidSet::LiquidSet ( QWidget* parent, const char *name, WFlags fl )
+ vbox-> addSpacing ( 4 );
+
+ QCheckBox *windeco = new QCheckBox ( tr( "Draw liquid window title bars" ), this );
+ windeco-> setChecked ( m_deco );
+ vbox-> addWidget ( windeco );
+
+ vbox-> addSpacing ( 4 );
+
+ QHBoxLayout *hbox = new QHBoxLayout ( vbox );
+
+ hbox-> addWidget ( new QLabel ( tr( "Stipple contrast" ), this ));
+
+ m_contsld = new QSlider ( Horizontal, this );
+ m_contsld-> setRange ( 0, 10 );
+ m_contsld-> setValue ( contrast );
+ m_contsld-> setTickmarks ( QSlider::Below );
+ hbox-> addWidget ( m_contsld, 10 );
+
vbox-> addStretch ( 10 );
+
+ changeType ( m_type );
@@ -148,2 +175,3 @@ LiquidSet::LiquidSet ( QWidget* parent, const char *name, WFlags fl )
connect ( shadow, SIGNAL( toggled ( bool ) ), this, SLOT( changeShadow ( bool ) ) );
+ connect ( windeco, SIGNAL( toggled ( bool ) ), this, SLOT( changeDeco ( bool ) ) );
}
@@ -166,3 +194,3 @@ void LiquidSet::changeMenuColor ( const QColor &col )
{
- m_menubtn-> setPalette ( col );
+ changeButtonColor ( m_menubtn, col );
m_menucol = col;
@@ -172,3 +200,3 @@ void LiquidSet::changeTextColor ( const QColor &col )
{
- m_textbtn-> setPalette ( col );
+ changeButtonColor ( m_textbtn, col );
m_textcol = col;
@@ -181,2 +209,7 @@ void LiquidSet::changeShadow ( bool b )
+void LiquidSet::changeDeco ( bool b )
+{
+ m_deco = b;
+}
+
@@ -185,3 +218,3 @@ void LiquidSet::accept ( )
Config config ( "qpe" );
- config. setGroup ( "MosfetMenus" );
+ config. setGroup ( "Liquid-Style" );
@@ -192,2 +225,4 @@ void LiquidSet::accept ( )
config. writeEntry ( "ShadowText", m_shadow );
+ config. writeEntry ( "WinDecoration", m_deco );
+ config. writeEntry ( "StippleContrast", m_contsld-> value ( ));
config. write ( );