D9227: [Breeze widget style] Override QLineEditIconButton paint event to force Active icon on press
Hugo Pereira Da Costa
noreply at phabricator.kde.org
Wed Dec 6 17:12:58 UTC 2017
hpereiradacosta added a comment.
In https://phabricator.kde.org/D9227#176763, @broulik wrote:
> The problem is that the button is entirely custom-painted by Qt:
>
> void QLineEditIconButton::paintEvent(QPaintEvent *)
> {
> [...]
>
> // Note isDown should really use the active state but in most styles
> // this has no proper feedback
> QIcon::Mode state = QIcon::Disabled;
> if (isEnabled())
> state = isDown() ? QIcon::Selected : QIcon::Normal;
>
> [...]
>
> const QPixmap iconPixmap = icon().pixmap(window, iconSize, state, QIcon::Off);
>
> [...]
> }
>
I understand that.
My idea was rather to call setIcon( xxx ) on the said button at the "appropriate time" (still to be defined), with an icon made custom so that it's Selected state is the same as its Activate state. Does that make sense ?
In any case I can try give it a shot on my side before accepting this patch.
REPOSITORY
R31 Breeze
REVISION DETAIL
https://phabricator.kde.org/D9227
To: broulik, #plasma, #vdg, hpereiradacosta
Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20171206/092ff5e6/attachment.html>
More information about the Plasma-devel
mailing list