Review Request 127494: Fix drawing correct focus state of QtQuickControls Button
David Rosca
nowrep at gmail.com
Sat Mar 26 10:32:34 UTC 2016
> On March 26, 2016, 10:14 a.m., Hugo Pereira Da Costa wrote:
> > kstyle/breezestyle.cpp, line 3388
> > <https://git.reviewboard.kde.org/r/127494/diff/1/?file=454100#file454100line3388>
> >
> > mmm. But is it not rather a qtc bug that states are set in an inconsistent manner between widgets and qtc ?
> > This is not the only place in breeze where we have to work around these kind of issues (the other being min iconsize in menus to cite one)
> > This just tend to make the breeze code bloated and hard to maintain. Besides it doesn't fix the "other" styles (there is oxygen, but there are others).
> > What are the chances to get these fixed upstream (eg: sunken !? checked) ?
>
> Hugo Pereira Da Costa wrote:
> meant "sunken neq checked"
Well, QtQuickControls is probably to blame, but it works fine with other styles. What I think is incorrect (even for QtWidgets) is to assume focus on button with State_Sunken.
>From doc:
QStyle::State_Sunken 0x00000004 Used to indicate if the widget is sunken or pressed.
so the widget can be sunken, but not pressed.
The State_Sunken flag for the hasFocus check was added in https://git.reviewboard.kde.org/r/120222/ to fix ToolButtons, but this function is not used for drawing ToolButtons. So maybe we can just use only `state & State_HasFocus` here for both quickcontrols and widgets?
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127494/#review94012
-----------------------------------------------------------
On March 25, 2016, 8:26 p.m., David Rosca wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127494/
> -----------------------------------------------------------
>
> (Updated March 25, 2016, 8:26 p.m.)
>
>
> Review request for Plasma and Hugo Pereira Da Costa.
>
>
> Repository: breeze
>
>
> Description
> -------
>
> Button with checked == true would be incorrectly drawn as always having focus.
> Checked QtQuickControls Button always have State_Sunken.
>
>
> Diffs
> -----
>
> kstyle/breezestyle.cpp e97ead6
>
> Diff: https://git.reviewboard.kde.org/r/127494/diff/
>
>
> Testing
> -------
>
> Fixed for QQC, no change in QtWidgets.
>
>
> Thanks,
>
> David Rosca
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160326/d9e4b528/attachment-0001.html>
More information about the Plasma-devel
mailing list