On Thu, May 18, 2017 at 11:52 AM, Timm Bäder <m...@baedert.org> wrote:

> Hi,
>
> I've collected a whole bunch of changes in th wip/baedert/drawing branch.
> Here's a little overview of how things work in there, so we can decide
> if it's the right way forward.
>

Hey Tim, thanks for writing this up.

Let me ask a few questions that are unclear to me, before we discuss the
individual things:

- What are the overall goals here ? That would be good to know. My guess
would be:
  1) Get rid of gadgets
  2) Full css drawing for all widgets
  anything else ?


>   - gtk_widget_real_snapshot calls gtk_widget_snapshot_child on all the
>    child widgets of the given GtkWidget instance. This makes sense to me
>    but it's already been problematic when porting GtkScale and GtkRange
>    away from gadgets because GtkRange didn't override ::snapshot so
>    GtkScale couldn't just subclass it and chain up, since it would cause
>    all child widgets to be drawn twice.
>

Iirc, we've had this kind of issue with containers in the past. You can't
chain up without knowing
details about the parents implementation, and ordering becomes really
tricky to get right.

Remaining problems/open questions:
>  - Both GtkWindow and GtkPopover are special-cased in
>    gtk_widget_snapshot to not draw the CSS background and border for
>    them, since they are just too special. Getting rid of that special
>    case would require porting them away from manual background drawing.
>  - There are lots of CSS problems now of course, e.g. GtkRevealer does
>    not hide its padding anymore so GtkSearchBar always leaves a few
>    pixels of space around, or the 4px margin around GtkMenu which is not
>    applied inside the toplevel instead of outside. Also GtkCheckButton
>    obviously.
>

So this is a case where we deviate from gtk3 theming and introduce
Adwaigtk-4.0


>  - Focus outlines work out pretty badly the way they are currently done
>    in the branch. Wit gadgets, widgets had pretty fine-grained control
>    over which gadget draws the focus outline.
>

How _are_ they done now ?
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to