Diffstat (limited to 'noncore/styles/liquid/liquidset.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/styles/liquid/liquidset.cpp | 58 |
1 files changed, 26 insertions, 32 deletions
diff --git a/noncore/styles/liquid/liquidset.cpp b/noncore/styles/liquid/liquidset.cpp index 5ae19ba..1b9526f 100644 --- a/noncore/styles/liquid/liquidset.cpp +++ b/noncore/styles/liquid/liquidset.cpp @@ -30,3 +30,3 @@ #include <qtoolbutton.h> -#include <qbuttongroup.h> +#include <qcombobox.h> #include <qradiobutton.h> @@ -74,2 +74,3 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl ) int contrast = config. readNumEntry ( "StippleContrast", 5 ); + m_flat = config. readBoolEntry ( "FlatToolButtons", false ); @@ -77,35 +78,15 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl ) vbox-> setSpacing ( 3 ); - vbox-> setMargin ( 6 ); + vbox-> setMargin ( 4 ); - QButtonGroup *btngrp = new QButtonGroup ( this ); - btngrp-> hide ( ); - - QRadioButton *rad; - - rad = new QRadioButton ( tr( "No translucency" ), this ); - btngrp-> insert ( rad, None ); - vbox-> addWidget ( rad ); - - rad = new QRadioButton ( tr( "Stippled, background color" ), this ); - btngrp-> insert ( rad, StippledBg ); - vbox-> addWidget ( rad ); - - rad = new QRadioButton ( tr( "Stippled, button color" ), this ); - btngrp-> insert ( rad, StippledBtn ); - vbox-> addWidget ( rad ); - - rad = new QRadioButton ( tr( "Translucent stippled, background color" ), this ); - btngrp-> insert ( rad, TransStippleBg ); - vbox-> addWidget ( rad ); - - rad = new QRadioButton ( tr( "Translucent stippled, button color" ), this ); - btngrp-> insert ( rad, TransStippleBtn ); - vbox-> addWidget ( rad ); + QComboBox *cb = new QComboBox ( this ); + cb-> insertItem ( tr( "No translucency" ), None ); + cb-> insertItem ( tr( "Stippled, background color" ), StippledBg ); + cb-> insertItem ( tr( "Stippled, button color" ), StippledBtn ); + cb-> insertItem ( tr( "Translucent stippled, background color" ), TransStippleBg ); + cb-> insertItem ( tr( "Translucent stippled, button color" ), TransStippleBtn ); + cb-> insertItem ( tr( "Custom translucency" ), Custom ); - rad = new QRadioButton ( tr( "Custom translucency" ), this ); - btngrp-> insert ( rad, Custom ); - vbox-> addWidget ( rad ); + cb-> setCurrentItem ( m_type ); + vbox-> addWidget ( cb ); - btngrp-> setExclusive ( true ); - btngrp-> setButton ( m_type ); @@ -159,2 +140,8 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl ) + QCheckBox *flattb = new QCheckBox ( tr( "Make toolbar buttons appear flat" ), this ); + flattb-> setChecked ( m_flat ); + vbox-> addWidget ( flattb ); + + vbox-> addSpacing ( 4 ); + QHBoxLayout *hbox = new QHBoxLayout ( vbox ); @@ -173,5 +160,6 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl ) - connect ( btngrp, SIGNAL( clicked ( int ) ), this, SLOT( changeType ( int ) ) ); + connect ( cb, SIGNAL( highlighted ( int ) ), this, SLOT( changeType ( int ) ) ); connect ( shadow, SIGNAL( toggled ( bool ) ), this, SLOT( changeShadow ( bool ) ) ); connect ( windeco, SIGNAL( toggled ( bool ) ), this, SLOT( changeDeco ( bool ) ) ); + connect ( flattb, SIGNAL( toggled ( bool ) ), this, SLOT( changeFlat ( bool ) ) ); } @@ -214,2 +202,7 @@ void LiquidSettings::changeDeco ( bool b ) +void LiquidSettings::changeFlat ( bool b ) +{ + m_flat = b; +} + @@ -227,2 +220,3 @@ bool LiquidSettings::writeConfig ( ) config. writeEntry ( "StippleContrast", m_contsld-> value ( )); + config. writeEntry ( "FlatToolButtons", m_flat ); config. write ( ); |