133 setStyleSheet(
"QPushButton { background-color: none; }" );
139 int nFactorGradient = 126;
140 int nFactorGradientShadow = 225;
149 QColor baseColorBackground = pPref->getColorTheme()->m_widgetColor;
150 QColor backgroundLight = baseColorBackground.lighter( nFactorGradient );
151 QColor backgroundDark = baseColorBackground.darker( nFactorGradient );
152 QColor backgroundLightHover = baseColorBackground.lighter( nFactorGradient + nHover );
153 QColor backgroundDarkHover = baseColorBackground.darker( nFactorGradient + nHover );
154 QColor backgroundShadowLight = baseColorBackground.lighter( nFactorGradientShadow );
155 QColor backgroundShadowDark = baseColorBackground.darker( nFactorGradientShadow );
156 QColor backgroundShadowLightHover = baseColorBackground.lighter( nFactorGradientShadow + nHover );
157 QColor backgroundShadowDarkHover = baseColorBackground.darker( nFactorGradientShadow + nHover );
158 QColor border = Qt::black;
160 QColor baseColorBackgroundChecked, textChecked;
162 baseColorBackgroundChecked = pPref->getColorTheme()->m_accentColor;
163 textChecked = pPref->getColorTheme()->m_accentTextColor;
165 baseColorBackgroundChecked = pPref->getColorTheme()->m_buttonRedColor;
166 textChecked = pPref->getColorTheme()->m_buttonRedTextColor;
169 QColor backgroundCheckedLight = baseColorBackgroundChecked.lighter( nFactorGradient );
170 QColor backgroundCheckedDark = baseColorBackgroundChecked.darker( nFactorGradient );
171 QColor backgroundCheckedLightHover = baseColorBackgroundChecked.lighter( nFactorGradient + nHover );
172 QColor backgroundCheckedDarkHover = baseColorBackgroundChecked.darker( nFactorGradient + nHover );
173 QColor backgroundShadowCheckedLight = baseColorBackgroundChecked.lighter( nFactorGradientShadow );
174 QColor backgroundShadowCheckedDark = baseColorBackgroundChecked.darker( nFactorGradientShadow );
175 QColor backgroundShadowCheckedLightHover = baseColorBackgroundChecked.lighter( nFactorGradientShadow + nHover );
176 QColor backgroundShadowCheckedDarkHover = baseColorBackgroundChecked.darker( nFactorGradientShadow + nHover );
178 QColor textColor = pPref->getColorTheme()->m_widgetTextColor;
180 QColor backgroundInactiveLight =
182 QColor backgroundInactiveLightHover = backgroundInactiveLight;
183 QColor backgroundInactiveCheckedLight =
185 QColor backgroundInactiveCheckedLightHover = backgroundInactiveCheckedLight;
186 QColor backgroundInactiveDark =
188 QColor backgroundInactiveDarkHover = backgroundInactiveDark;
189 QColor backgroundInactiveCheckedDark =
191 QColor backgroundInactiveCheckedDarkHover = backgroundInactiveCheckedDark;
192 QColor backgroundShadowInactiveLight =
194 QColor backgroundShadowInactiveLightHover = backgroundShadowInactiveLight;
195 QColor backgroundShadowInactiveCheckedLight =
197 QColor backgroundShadowInactiveCheckedLightHover = backgroundShadowInactiveCheckedLight;
198 QColor backgroundShadowInactiveDark =
200 QColor backgroundShadowInactiveDarkHover = backgroundShadowInactiveDark;
201 QColor backgroundShadowInactiveCheckedDark =
203 QColor backgroundShadowInactiveCheckedDarkHover = backgroundShadowInactiveCheckedDark;
206 setStyleSheet( QString(
"\
207QPushButton:enabled { \
209 border: 1px solid %12; \
210 border-radius: %2px; \
212 background-color: qlineargradient(x1: %41, y1: %43, x2: %42, y2: %44, \
213 stop: 0 %23, stop: %39 %3, \
214 stop: %40 %4, stop: 1 %24); \
216QPushButton:enabled:hover { \
217 background-color: qlineargradient(x1: %41, y1: %43, x2: %42, y2: %44, \
218 stop: 0 %25, stop: %39 %5, \
219 stop: %40 %6, stop: 1 %26); \
221QPushButton:enabled:checked { \
223 border: 1px solid %12; \
224 border-radius: %2px; \
226 background-color: qlineargradient(x1: %41, y1: %43, x2: %42, y2: %44, \
227 stop: 0 %27, stop: %39 %8, \
228 stop: %40 %9, stop: 1 %28); \
230QPushButton:enabled:checked:hover { \
231 background-color: qlineargradient(x1: %41, y1: %43, x2: %42, y2: %44, \
232 stop: 0 %29, stop: %39 %10, \
233 stop: %40 %11, stop: 1 %30); \
235QPushButton:disabled { \
237 border: 1px solid %12; \
238 border-radius: %2px; \
240 background-color: qlineargradient(x1: %41, y1: %43, x2: %42, y2: %44, \
241 stop: 0 %31, stop: %39 %14, \
242 stop: %40 %15, stop: 1 %32); \
244QPushButton:disabled:hover { \
245 background-color: qlineargradient(x1: %41, y1: %43, x2: %42, y2: %44, \
246 stop: 0 %33, stop: %39 %16, \
247 stop: %40 %17, stop: 1 %34); \
249QPushButton:disabled:checked { \
251 border: 1px solid %12; \
252 border-radius: %2px; \
254 background-color: qlineargradient(x1: %41, y1: %43, x2: %42, y2: %44, \
255 stop: 0 %35, stop: %39 %19, \
256 stop: %40 %20, stop: 1 %36); \
258QPushButton:disabled:checked:hover { \
259 background-color: qlineargradient(x1: %41, y1: %43, x2: %42, y2: %44, \
260 stop: 0 %37, stop: %39 %21, \
261 stop: %40 %22, stop: 1 %38); \
264 .arg( textColor.name() )
266 .arg( backgroundLight.name() )
267 .arg( backgroundDark.name() )
268 .arg( backgroundLightHover.name() )
269 .arg( backgroundDarkHover.name() )
270 .arg( textChecked.name() )
271 .arg( backgroundCheckedLight.name() )
272 .arg( backgroundCheckedDark.name() )
273 .arg( backgroundCheckedLightHover.name() )
274 .arg( backgroundCheckedDarkHover.name() )
275 .arg( border.name() )
276 .arg( textInactiveColor.name() )
277 .arg( backgroundInactiveLight.name() )
278 .arg( backgroundInactiveDark.name() )
279 .arg( backgroundInactiveLightHover.name() )
280 .arg( backgroundInactiveDarkHover.name() )
281 .arg( textChecked.name() )
282 .arg( backgroundInactiveCheckedLight.name() )
283 .arg( backgroundInactiveCheckedDark.name() )
284 .arg( backgroundInactiveCheckedLightHover.name() )
285 .arg( backgroundInactiveCheckedDarkHover.name() )
286 .arg( backgroundShadowLight.name() )
287 .arg( backgroundShadowDark.name() )
288 .arg( backgroundShadowLightHover.name() )
289 .arg( backgroundShadowDarkHover.name() )
290 .arg( backgroundShadowCheckedLight.name() )
291 .arg( backgroundShadowCheckedDark.name() )
292 .arg( backgroundShadowCheckedLightHover.name() )
293 .arg( backgroundShadowCheckedDarkHover.name() )
294 .arg( backgroundShadowInactiveLight.name() )
295 .arg( backgroundShadowInactiveDark.name() )
296 .arg( backgroundShadowInactiveLightHover.name() )
297 .arg( backgroundShadowInactiveDarkHover.name() )
298 .arg( backgroundShadowInactiveCheckedLight.name() )
299 .arg( backgroundShadowInactiveCheckedDark.name() )
300 .arg( backgroundShadowInactiveCheckedLightHover.name() )
301 .arg( backgroundShadowInactiveCheckedDarkHover.name() )
302 .arg( fStop1 ).arg( fStop2 ).arg( x1 ).arg( x2 )
303 .arg( y1 ).arg( y2 ) );