Commit 3e9cd8d1 authored by Noah Davis's avatar Noah Davis 🌵
Browse files

Make checkboxes/radiobuttons use Window Background in windows and View Backround in lists

Summary: If the widget has an item view parent, use the View Background color. Otherwise, use Window Background.

Test Plan: {F7881597, size=full}

Reviewers: #vdg, #breeze, hpereiradacosta, ngraham

Reviewed By: #vdg, hpereiradacosta

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26639
parent 3577d15f
......@@ -3849,10 +3849,11 @@ namespace Breeze
const auto shadow( _helper->shadowColor( palette ) );
const AnimationMode mode( _animations->widgetStateEngine().isAnimated( widget, AnimationHover ) ? AnimationHover:AnimationNone );
const qreal opacity( _animations->widgetStateEngine().opacity( widget, AnimationHover ) );
QColor background = itemViewParent( widget ) ? palette.color( QPalette::Base ) : palette.color( QPalette::Window );
QColor color = _helper->checkBoxIndicatorColor( palette, mouseOver, enabled && active, opacity, mode );
// render
_helper->renderCheckBoxBackground( painter, rect, palette.color( QPalette::Base ), sunken );
_helper->renderCheckBoxBackground( painter, rect, background, sunken );
_helper->renderCheckBox( painter, rect, color, shadow, sunken, checkBoxState, animation );
return true;
......@@ -3886,10 +3887,11 @@ namespace Breeze
const auto shadow( _helper->shadowColor( palette ) );
const AnimationMode mode( _animations->widgetStateEngine().isAnimated( widget, AnimationHover ) ? AnimationHover:AnimationNone );
const qreal opacity( _animations->widgetStateEngine().opacity( widget, AnimationHover ) );
QColor background = itemViewParent( widget ) ? palette.color( QPalette::Base ) : palette.color( QPalette::Window );
QColor color = _helper->checkBoxIndicatorColor( palette, mouseOver, enabled && checked, opacity, mode );
// render
_helper->renderRadioButtonBackground( painter, rect, palette.color( QPalette::Base ), sunken );
_helper->renderRadioButtonBackground( painter, rect, background, sunken );
_helper->renderRadioButton( painter, rect, color, shadow, sunken, radioButtonState, animation );
return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment