[Breeze] [Bug 158379] Draw focus rect in Kate Part instead of Widget Style (Oxygen)
Hugo Pereira Da Costa
hugo.pereira at free.fr
Wed Sep 10 10:03:44 UTC 2014
https://bugs.kde.org/show_bug.cgi?id=158379
Hugo Pereira Da Costa <hugo.pereira at free.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hugo.pereira at free.fr
--- Comment #9 from Hugo Pereira Da Costa <hugo.pereira at free.fr> ---
(In reply to Dominik Haumann from comment #8)
> To sum up again: Styles have much more control over how a focus rect
> appears: Oxygen and other styles like Breeze have a decent fade-in and
> fade-out animation. It's not possible to draw this animation from the
> client-side. Therefore, the focus rect *has* to be drawn in the style, I
> don't see a way around that... Therefore, this will as of now not be solved
> within kate part. Either the styles implement the focus rect, or it's not
> there.
>
> Not having a focus rect may currently not be a big thing, since the flat
> design of current themes anyway don't require a that much distinct focus
> rect. But we'll leave that for the style designers :-)
>
> We'll reassign this to to style components again.
Hi Dominik,
I 'think' that to have focus indicator, first you need a QFrame in the widget
stack, or something that mimics a QFrame to the style, a la
style()->drawControl(QStyle::CE_ShapedFrame, &opt, p, this);
And make sure that the passed option (&opt) has the right focus bit set (as
well as Hover, for that matter).
That should do the trick for all styles.
Additional tweaking might be needed for oxygen and breeze, to plug in animation
on top of that.
Now, the current kate, kwrite look rather flat !
No frame -> no focus :D
Personally, I believe whether the view should be rendered flat or not should be
left to the style (it will be quite flat-ish in breeze as all the rest, but
would look better sunken in oxygen), and that would let them do the rendering.
I'm willing to help achieve this in ktexteditor, test, and submit patch to you
for review,
I'd might need some help to get me started though and for instance I'm not sure
what widget would be the right one to hold the frame ?
KTextEditor::View ?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Plasma-devel
mailing list