From c4a67d1f613b10c77d1f763f6dcc053a9b664351 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 26 Mar 2016 16:09:00 +0100 Subject: [PATCH 1/2] Fix flags compare in drawTitleBarComplexControl Fixes compiler warning and logic (always evaluated to false). REVIEW: 127500 --- kstyle/breezestyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index e97ead65..f8189b54 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -6372,7 +6372,7 @@ namespace Breeze { // skip if not requested - if( !titleBarOption->subControls & subControl ) continue; + if( !( titleBarOption->subControls & subControl ) ) continue; // find matching icon QIcon icon; From 24cbc7312a5f77ea3997e49a84223a4deb315fcb Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 26 Mar 2016 16:11:32 +0100 Subject: [PATCH 2/2] Fix drawing correct focus state of QtQuickControls Button Button with checked == true would be incorrectly drawn as always having focus. Checked QtQuickControls Button always have State_Sunken. REVIEW: 127494 --- kstyle/breezestyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index f8189b54..0341526c 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -3385,7 +3385,7 @@ namespace Breeze const State& state( option->state ); const bool enabled( state & State_Enabled ); const bool mouseOver( enabled && ( state & State_MouseOver ) ); - const bool hasFocus( ( enabled && ( state & ( State_HasFocus | State_Sunken ) ) ) && !( widget && widget->focusProxy())); + const bool hasFocus( ( enabled && ( state & State_HasFocus ) ) && !( widget && widget->focusProxy())); const bool sunken( state & ( State_On|State_Sunken ) ); const bool flat( buttonOption->features & QStyleOptionButton::Flat );