Diffstat (limited to 'noncore/styles/liquid/settings/liquidset.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/styles/liquid/settings/liquidset.cpp | 45 |
1 files changed, 40 insertions, 5 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,3 +65,3 @@ LiquidSet::LiquidSet ( QWidget* parent, const char *name, WFlags fl ) Config config ( "qpe" ); - config. setGroup ( "MosfetMenus" ); + config. setGroup ( "Liquid-Style" ); @@ -67,2 +72,4 @@ LiquidSet::LiquidSet ( QWidget* parent, const char *name, WFlags fl ) 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,6 +151,27 @@ 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 ); + connect ( btngrp, SIGNAL( clicked ( int ) ), this, SLOT( changeType ( int ) ) ); 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 ( ); |