[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-devel
Subject:    Re: wip/baedert/drawing branch
From:       Matthias Clasen <matthias.clasen () gmail ! com>
Date:       2017-05-18 21:30:53
Message-ID: CAFwd_vDabSyxhd8UP9OW_D_BDyL2Y=1qHqL3+YnzNFaZFrL38w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, May 18, 2017 at 3:19 PM, Timm Bäder <mail@baedert.org> wrote:

>
> > How _are_ they done now ?
>
> gtk_widget_snapshot just draws it around the widget if
> gtk_widget_has_visible_focus returns TRUE for it:
> https://git.gnome.org/browse/gtk+/tree/gtk/gtkwidget.c?h=
> wip/baedert/drawing#n15693
>
> So e.g. dragging on a scale slider means the entire scale gets a focus
> rectangle drawn, and entries get a focus rectangle drawn on top of their
> normal focus indication (the blue border). Dunno if we can just set
> can-focus to FALSE for appropriate (child) widgets and it works itself
> out.
>

I think that is not going to work.

What we need here is a way to decouple the actual focus location (ie where
key events get sent)
from the focus indication (what to draw the focus rectangle around). With
gadgets, this was
separated by having focus location always be the widget, while the
rectangle could be drawing
around one of the gadgets inside.

[Attachment #5 (text/html)]

<div dir="ltr">On Thu, May 18, 2017 at 3:19 PM, Timm Bäder <span dir="ltr">&lt;<a \
href="mailto:mail@baedert.org" target="_blank">mail@baedert.org</a>&gt;</span> \
wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class=""><br> &gt; How _are_ they done now ?<br>
<br>
</span>gtk_widget_snapshot just draws it around the widget if<br>
gtk_widget_has_visible_focus returns TRUE for it:<br>
<a href="https://git.gnome.org/browse/gtk+/tree/gtk/gtkwidget.c?h=wip/baedert/drawing#n15693" \
rel="noreferrer" target="_blank">https://git.gnome.org/browse/<wbr>gtk+/tree/gtk/gtkwidget.c?h=<wbr>wip/baedert/drawing#n15693</a><br>
 <br>
So e.g. dragging on a scale slider means the entire scale gets a focus<br>
rectangle drawn, and entries get a focus rectangle drawn on top of their<br>
normal focus indication (the blue border). Dunno if we can just set<br>
can-focus to FALSE for appropriate (child) widgets and it works itself<br>
out.<br>
</blockquote></div><br></div><div class="gmail_extra">I think that is not going to \
work.<br><br>What we need here is a way to decouple the actual focus location (ie \
where key events get sent)<br>from the focus indication (what to draw the focus \
rectangle around). With gadgets, this was<br>separated by having focus location \
always be the widget, while the rectangle could be drawing<br>around one of the \
gadgets inside.<br></div></div>



_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic