-rw-r--r-- | noncore/styles/liquid/liquidset.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/styles/liquid/liquidset.cpp b/noncore/styles/liquid/liquidset.cpp index 7747da7..a7cfccc 100644 --- a/noncore/styles/liquid/liquidset.cpp +++ b/noncore/styles/liquid/liquidset.cpp | |||
@@ -75,95 +75,95 @@ LiquidSettings::LiquidSettings ( QWidget* parent, const char *name, WFlags fl ) | |||
75 | grid-> addColSpacing ( 3, 8 ); | 75 | grid-> addColSpacing ( 3, 8 ); |
76 | 76 | ||
77 | grid-> addWidget ( m_menulbl = new QLabel ( tr( "Menu color" ), this ), 0, 1 ); | 77 | grid-> addWidget ( m_menulbl = new QLabel ( tr( "Menu color" ), this ), 0, 1 ); |
78 | grid-> addWidget ( m_textlbl = new QLabel ( tr( "Text color" ), this ), 0, 4 ); | 78 | grid-> addWidget ( m_textlbl = new QLabel ( tr( "Text color" ), this ), 0, 4 ); |
79 | grid-> addWidget ( m_opaclbl = new QLabel ( tr( "Opacity" ), this ), 1, 1 ); | 79 | grid-> addWidget ( m_opaclbl = new QLabel ( tr( "Opacity" ), this ), 1, 1 ); |
80 | 80 | ||
81 | m_menubtn = new OColorButton ( this, mcol ); | 81 | m_menubtn = new OColorButton ( this, mcol ); |
82 | grid-> addWidget ( m_menubtn, 0, 2 ); | 82 | grid-> addWidget ( m_menubtn, 0, 2 ); |
83 | 83 | ||
84 | m_textbtn = new OColorButton ( this, tcol ); | 84 | m_textbtn = new OColorButton ( this, tcol ); |
85 | grid-> addWidget ( m_textbtn, 0, 5 ); | 85 | grid-> addWidget ( m_textbtn, 0, 5 ); |
86 | 86 | ||
87 | m_opacsld = new QSlider ( Horizontal, this ); | 87 | m_opacsld = new QSlider ( Horizontal, this ); |
88 | m_opacsld-> setRange ( -20, 20 ); | 88 | m_opacsld-> setRange ( -20, 20 ); |
89 | m_opacsld-> setSteps ( 1, 1 ); | 89 | m_opacsld-> setSteps ( 1, 1 ); |
90 | m_opacsld-> setValue ( opacity ); | 90 | m_opacsld-> setValue ( opacity ); |
91 | m_opacsld-> setTickmarks ( QSlider::Below ); | 91 | m_opacsld-> setTickmarks ( QSlider::Below ); |
92 | grid-> addMultiCellWidget ( m_opacsld, 1, 1, 2, 5 ); | 92 | grid-> addMultiCellWidget ( m_opacsld, 1, 1, 2, 5 ); |
93 | 93 | ||
94 | vbox-> addSpacing ( 4 ); | 94 | vbox-> addSpacing ( 4 ); |
95 | 95 | ||
96 | QCheckBox *shadow = new QCheckBox ( tr( "Use shadowed menu text" ), this ); | 96 | QCheckBox *shadow = new QCheckBox ( tr( "Use shadowed menu text" ), this ); |
97 | shadow-> setChecked ( m_shadow ); | 97 | shadow-> setChecked ( m_shadow ); |
98 | vbox-> addWidget ( shadow ); | 98 | vbox-> addWidget ( shadow ); |
99 | 99 | ||
100 | vbox-> addSpacing ( 4 ); | 100 | vbox-> addSpacing ( 4 ); |
101 | 101 | ||
102 | QCheckBox *flattb = new QCheckBox ( tr( "Make toolbar buttons appear flat" ), this ); | 102 | QCheckBox *flattb = new QCheckBox ( tr( "Make toolbar buttons appear flat" ), this ); |
103 | flattb-> setChecked ( m_flat ); | 103 | flattb-> setChecked ( m_flat ); |
104 | vbox-> addWidget ( flattb ); | 104 | vbox-> addWidget ( flattb ); |
105 | 105 | ||
106 | vbox-> addSpacing ( 4 ); | 106 | vbox-> addSpacing ( 4 ); |
107 | 107 | ||
108 | QHBoxLayout *hbox = new QHBoxLayout ( vbox ); | 108 | QHBoxLayout *hbox = new QHBoxLayout ( vbox ); |
109 | 109 | ||
110 | hbox-> addWidget ( new QLabel ( tr( "Stipple contrast" ), this )); | 110 | hbox-> addWidget ( new QLabel ( tr( "Stipple contrast" ), this )); |
111 | 111 | ||
112 | m_contsld = new QSlider ( Horizontal, this ); | 112 | m_contsld = new QSlider ( Horizontal, this ); |
113 | m_contsld-> setRange ( 0, 10 ); | 113 | m_contsld-> setRange ( 0, 10 ); |
114 | m_contsld-> setSteps ( 1, 1 ); | 114 | m_contsld-> setSteps ( 1, 1 ); |
115 | m_contsld-> setValue ( contrast ); | 115 | m_contsld-> setValue ( contrast ); |
116 | m_contsld-> setTickmarks ( QSlider::Below ); | 116 | m_contsld-> setTickmarks ( QSlider::Below ); |
117 | hbox-> addWidget ( m_contsld, 10 ); | 117 | hbox-> addWidget ( m_contsld, 10 ); |
118 | 118 | ||
119 | vbox-> addStretch ( 10 ); | 119 | vbox-> addStretch ( 10 ); |
120 | 120 | ||
121 | changeType ( m_type ); | 121 | changeType ( m_type ); |
122 | 122 | ||
123 | connect ( cb, SIGNAL( highlighted ( int ) ), this, SLOT( changeType ( int ) ) ); | 123 | connect ( cb, SIGNAL( highlighted(int) ), this, SLOT( changeType(int) ) ); |
124 | connect ( shadow, SIGNAL( toggled ( bool ) ), this, SLOT( changeShadow ( bool ) ) ); | 124 | connect ( shadow, SIGNAL( toggled(bool) ), this, SLOT( changeShadow(bool) ) ); |
125 | connect ( flattb, SIGNAL( toggled ( bool ) ), this, SLOT( changeFlat ( bool ) ) ); | 125 | connect ( flattb, SIGNAL( toggled(bool) ), this, SLOT( changeFlat(bool) ) ); |
126 | } | 126 | } |
127 | 127 | ||
128 | void LiquidSettings::changeType ( int t ) | 128 | void LiquidSettings::changeType ( int t ) |
129 | { | 129 | { |
130 | bool custom = ( t == Custom ); | 130 | bool custom = ( t == Custom ); |
131 | 131 | ||
132 | m_menulbl-> setEnabled ( custom ); | 132 | m_menulbl-> setEnabled ( custom ); |
133 | m_textlbl-> setEnabled ( custom ); | 133 | m_textlbl-> setEnabled ( custom ); |
134 | m_opaclbl-> setEnabled ( custom ); | 134 | m_opaclbl-> setEnabled ( custom ); |
135 | m_menubtn-> setEnabled ( custom ); | 135 | m_menubtn-> setEnabled ( custom ); |
136 | m_textbtn-> setEnabled ( custom ); | 136 | m_textbtn-> setEnabled ( custom ); |
137 | m_opacsld-> setEnabled ( custom ); | 137 | m_opacsld-> setEnabled ( custom ); |
138 | 138 | ||
139 | m_type = t; | 139 | m_type = t; |
140 | } | 140 | } |
141 | 141 | ||
142 | void LiquidSettings::changeShadow ( bool b ) | 142 | void LiquidSettings::changeShadow ( bool b ) |
143 | { | 143 | { |
144 | m_shadow = b; | 144 | m_shadow = b; |
145 | } | 145 | } |
146 | 146 | ||
147 | void LiquidSettings::changeFlat ( bool b ) | 147 | void LiquidSettings::changeFlat ( bool b ) |
148 | { | 148 | { |
149 | m_flat = b; | 149 | m_flat = b; |
150 | } | 150 | } |
151 | 151 | ||
152 | 152 | ||
153 | bool LiquidSettings::writeConfig ( ) | 153 | bool LiquidSettings::writeConfig ( ) |
154 | { | 154 | { |
155 | Config config ( "qpe" ); | 155 | Config config ( "qpe" ); |
156 | config. setGroup ( "Liquid-Style" ); | 156 | config. setGroup ( "Liquid-Style" ); |
157 | 157 | ||
158 | config. writeEntry ( "Type", m_type ); | 158 | config. writeEntry ( "Type", m_type ); |
159 | config. writeEntry ( "Color", m_menubtn-> color ( ). name ( )); | 159 | config. writeEntry ( "Color", m_menubtn-> color ( ). name ( )); |
160 | config. writeEntry ( "TextColor", m_textbtn-> color ( ). name ( )); | 160 | config. writeEntry ( "TextColor", m_textbtn-> color ( ). name ( )); |
161 | config. writeEntry ( "Opacity", m_opacsld-> value ( )); | 161 | config. writeEntry ( "Opacity", m_opacsld-> value ( )); |
162 | config. writeEntry ( "ShadowText", m_shadow ); | 162 | config. writeEntry ( "ShadowText", m_shadow ); |
163 | config. writeEntry ( "StippleContrast", m_contsld-> value ( )); | 163 | config. writeEntry ( "StippleContrast", m_contsld-> value ( )); |
164 | config. writeEntry ( "FlatToolButtons", m_flat ); | 164 | config. writeEntry ( "FlatToolButtons", m_flat ); |
165 | config. write ( ); | 165 | config. write ( ); |
166 | 166 | ||
167 | return true; | 167 | return true; |
168 | } | 168 | } |
169 | 169 | ||