summaryrefslogtreecommitdiff
path: root/noncore/styles/liquid/liquidset.cpp
Unidiff
Diffstat (limited to 'noncore/styles/liquid/liquidset.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/liquidset.cpp58
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 @@
30#include <qtoolbutton.h> 30#include <qtoolbutton.h>
31#include <qbuttongroup.h> 31#include <qcombobox.h>
32#include <qradiobutton.h> 32#include <qradiobutton.h>
@@ -74,2 +74,3 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl )
74 int contrast = config. readNumEntry ( "StippleContrast", 5 ); 74 int contrast = config. readNumEntry ( "StippleContrast", 5 );
75 m_flat = config. readBoolEntry ( "FlatToolButtons", false );
75 76
@@ -77,35 +78,15 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl )
77 vbox-> setSpacing ( 3 ); 78 vbox-> setSpacing ( 3 );
78 vbox-> setMargin ( 6 ); 79 vbox-> setMargin ( 4 );
79 80
80 QButtonGroup *btngrp = new QButtonGroup ( this ); 81 QComboBox *cb = new QComboBox ( this );
81 btngrp-> hide ( ); 82 cb-> insertItem ( tr( "No translucency" ), None );
82 83 cb-> insertItem ( tr( "Stippled, background color" ), StippledBg );
83 QRadioButton *rad; 84 cb-> insertItem ( tr( "Stippled, button color" ), StippledBtn );
84 85 cb-> insertItem ( tr( "Translucent stippled, background color" ), TransStippleBg );
85 rad = new QRadioButton ( tr( "No translucency" ), this ); 86 cb-> insertItem ( tr( "Translucent stippled, button color" ), TransStippleBtn );
86 btngrp-> insert ( rad, None ); 87 cb-> insertItem ( tr( "Custom translucency" ), Custom );
87 vbox-> addWidget ( rad );
88
89 rad = new QRadioButton ( tr( "Stippled, background color" ), this );
90 btngrp-> insert ( rad, StippledBg );
91 vbox-> addWidget ( rad );
92
93 rad = new QRadioButton ( tr( "Stippled, button color" ), this );
94 btngrp-> insert ( rad, StippledBtn );
95 vbox-> addWidget ( rad );
96
97 rad = new QRadioButton ( tr( "Translucent stippled, background color" ), this );
98 btngrp-> insert ( rad, TransStippleBg );
99 vbox-> addWidget ( rad );
100
101 rad = new QRadioButton ( tr( "Translucent stippled, button color" ), this );
102 btngrp-> insert ( rad, TransStippleBtn );
103 vbox-> addWidget ( rad );
104 88
105 rad = new QRadioButton ( tr( "Custom translucency" ), this ); 89 cb-> setCurrentItem ( m_type );
106 btngrp-> insert ( rad, Custom ); 90 vbox-> addWidget ( cb );
107 vbox-> addWidget ( rad );
108 91
109 btngrp-> setExclusive ( true );
110 btngrp-> setButton ( m_type );
111 92
@@ -159,2 +140,8 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl )
159 140
141 QCheckBox *flattb = new QCheckBox ( tr( "Make toolbar buttons appear flat" ), this );
142 flattb-> setChecked ( m_flat );
143 vbox-> addWidget ( flattb );
144
145 vbox-> addSpacing ( 4 );
146
160 QHBoxLayout *hbox = new QHBoxLayout ( vbox ); 147 QHBoxLayout *hbox = new QHBoxLayout ( vbox );
@@ -173,5 +160,6 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl )
173 160
174 connect ( btngrp, SIGNAL( clicked ( int ) ), this, SLOT( changeType ( int ) ) ); 161 connect ( cb, SIGNAL( highlighted ( int ) ), this, SLOT( changeType ( int ) ) );
175 connect ( shadow, SIGNAL( toggled ( bool ) ), this, SLOT( changeShadow ( bool ) ) ); 162 connect ( shadow, SIGNAL( toggled ( bool ) ), this, SLOT( changeShadow ( bool ) ) );
176 connect ( windeco, SIGNAL( toggled ( bool ) ), this, SLOT( changeDeco ( bool ) ) ); 163 connect ( windeco, SIGNAL( toggled ( bool ) ), this, SLOT( changeDeco ( bool ) ) );
164 connect ( flattb, SIGNAL( toggled ( bool ) ), this, SLOT( changeFlat ( bool ) ) );
177} 165}
@@ -214,2 +202,7 @@ void LiquidSettings::changeDeco ( bool b )
214 202
203void LiquidSettings::changeFlat ( bool b )
204{
205 m_flat = b;
206}
207
215 208
@@ -227,2 +220,3 @@ bool LiquidSettings::writeConfig ( )
227 config. writeEntry ( "StippleContrast", m_contsld-> value ( )); 220 config. writeEntry ( "StippleContrast", m_contsld-> value ( ));
221 config. writeEntry ( "FlatToolButtons", m_flat );
228 config. write ( ); 222 config. write ( );