Changeset View
Changeset View
Standalone View
Standalone View
kstyle/breezehelper.cpp
Show First 20 Lines • Show All 271 Lines • ▼ Show 20 Line(s) | 36 | { | |||
---|---|---|---|---|---|
272 | { | 272 | { | ||
273 | 273 | | |||
274 | QColor outline; | 274 | QColor outline; | ||
275 | const QColor hoverColor( this->hoverColor( palette ) ); | 275 | const QColor hoverColor( this->hoverColor( palette ) ); | ||
276 | const QColor focusColor( this->focusColor( palette ) ); | 276 | const QColor focusColor( this->focusColor( palette ) ); | ||
277 | const QColor sunkenColor = alphaColor( palette.color( QPalette::WindowText ), 0.2 ); | 277 | const QColor sunkenColor = alphaColor( palette.color( QPalette::WindowText ), 0.2 ); | ||
278 | 278 | | |||
279 | // hover takes precedence over focus | 279 | // hover takes precedence over focus | ||
280 | if( mode == AnimationHover ) | 280 | if( mode == AnimationHover && StyleConfigData::hoverEnabled() ) | ||
281 | { | 281 | { | ||
282 | 282 | | |||
283 | if( hasFocus ) outline = KColorUtils::mix( focusColor, hoverColor, opacity ); | 283 | if( hasFocus ) outline = KColorUtils::mix( focusColor, hoverColor, opacity ); | ||
284 | else if( sunken ) outline = sunkenColor; | 284 | else if( sunken ) outline = sunkenColor; | ||
285 | else outline = alphaColor( hoverColor, opacity ); | 285 | else outline = alphaColor( hoverColor, opacity ); | ||
286 | 286 | | |||
287 | } else if( mouseOver ) { | 287 | } else if( mouseOver && StyleConfigData::hoverEnabled() ) { | ||
288 | 288 | | |||
289 | outline = hoverColor; | 289 | outline = hoverColor; | ||
290 | 290 | | |||
291 | } else if( mode == AnimationFocus ) { | 291 | } else if( mode == AnimationFocus ) { | ||
292 | 292 | | |||
293 | if( sunken ) outline = KColorUtils::mix( sunkenColor, focusColor, opacity ); | 293 | if( sunken ) outline = KColorUtils::mix( sunkenColor, focusColor, opacity ); | ||
294 | else outline = alphaColor( focusColor, opacity ); | 294 | else outline = alphaColor( focusColor, opacity ); | ||
295 | 295 | | |||
▲ Show 20 Lines • Show All 1319 Lines • Show Last 20 Lines |