Commit Graph

27 Commits

Author SHA1 Message Date
Timm Bäder
6353433f0e Make gtk_container_set_focus_child private 2017-03-31 09:50:39 +02:00
Timm Bäder
1fcbc5b9e9 gtkcontainerprivate: Remove unused function prototypes 2017-02-14 16:56:55 +01:00
Benjamin Otte
c4065b9ee0 API: Export gtk_container_snapshot_child()
It's equivalent to gtk_container_propagate_draw() and then one is
public, too.
2016-12-20 19:26:40 +01:00
Benjamin Otte
e2fb970889 container: Remove get_render_node() support API
It's unused now.
2016-11-15 17:49:19 +01:00
Benjamin Otte
d1fec79c00 snapshot: Completely reengineer API
We now try to emulate cairo_t:

We keep a stack of nodes via push/pop and a transform matrix.

So whenever a new node is added to the snapshot, we transform it
by the current transform matrix and append it to the current node.
2016-11-15 17:48:45 +01:00
Benjamin Otte
bb9626dc29 window: Implement snapshot() 2016-11-15 17:48:45 +01:00
Matthias Clasen
68cc1412e5 container: Add a private api for render node propagation
Add a function that propagates a render node for a single
child. This will be used in the box gadget to handle widgets.
2016-11-01 14:29:25 -04:00
Emmanuele Bassi
cd0de3f87c gtk: Add GtkContainer API to gather render nodes
We cannot implement GtkWidgetClass.get_render_node() in GtkContainer
without breaking the fallback path that renders a widget to a single
render node rasterization. For GtkContainer subclasses we should provide
a simple API, similar to gtk_container_propagate_draw(), that gathers
all the render nodes for each child.
2016-10-18 11:49:09 +01:00
Benjamin Otte
d4d3374729 container: Remove gtk_container_set_resize_mode() 2016-10-16 18:18:58 +02:00
Benjamin Otte
4df6ddad54 API: container: Remove gtk_container_set_border_width() 2016-10-16 18:18:58 +02:00
Cosimo Cecchi
d61c2b4cce window: stop stomping on resize-mode set by external API
commit c3dc0d80f1 fixed the behavior of
GtkContainer widgets requesting an IMMEDIATE resize-mode.

However, GtkWindow has been stomping on resize-mode during realize()
since commit addcc64b9c. The combination
of factors that led to this not being a visible problem during all this
while is uncertain, but this now causes the Shell to continuously try to
relayout its ShellEmbeddedWindow (a GtkWindow subclass).

This commit separates the resize-mode as set internally by GtkWindow
from the one set with the external API, so that GtkWindow only changes
it when it had not been set before by the subclass.

https://bugzilla.gnome.org/show_bug.cgi?id=763650
2016-03-14 16:10:15 -07:00
Benjamin Otte
7a05016d93 container: Split out a function
Computing the clip for all children is something I want to do in other
places.
2015-12-15 08:41:16 -05:00
Benjamin Otte
690e015ed1 sizegroup: Move container function into its only caller 2015-10-28 19:44:27 +01:00
Benjamin Otte
ab2d236d3d sizegroup: Remove GtkQueueResizeFlags
They were only used with geometry widgets.
2015-10-28 19:44:27 +01:00
Benjamin Otte
51a1bc21af Revert "Avoid type checking overhead for resize-mode"
This reverts commit 3eacfa88f2.

Apart from the patch not being correct, we don't want to expose private
structures in header files if we can avoid it.
And this type-checking overhead is not an optimization that is even
measurable.

https://bugzilla.gnome.org/show_bug.cgi?id=754932
2015-09-12 21:27:24 +02:00
Matthias Clasen
3eacfa88f2 Avoid type checking overhead for resize-mode 2015-09-12 12:50:38 -04:00
Benjamin Otte
3d2ead0fce headerbar: Get rid of get_path_for_child()
Instead, reorder CSS nodes.
2015-07-16 06:15:13 +02:00
Matthias Clasen
02cd5737f6 Don't let themes override explicit border-width in dialogs
This fixes an issue where the theme-provided border-width prevents
dialog contents from lining up properly with the headerbar. To make
this work in message dialogs, we have to explicitly set the border-
width of the action area to 0.
2014-03-24 10:26:31 -04:00
Matthias Clasen
7da97a3642 Revert "Don't let themes override explicit border-width in dialogs"
This reverts commit 6e4567e73b.

For some reason, this causes buttons in message dialogs to have an
unwanted border.
2014-03-24 08:38:59 -04:00
Matthias Clasen
6e4567e73b Don't let themes override explicit border-width in dialogs
This fixes an issue where the theme-provided border-width prevents
dialog contents from lining up properly with the headerbar.
2014-03-21 15:41:13 -04:00
Owen W. Taylor
ce835dee74 GtkContainer: fix disconnection from frame clock
We need to disconnect the frame clock when we unrealize (at which
point the old clock is still alive) not in destroy(). Since there
is no common unrealize for containers, trigger this from GtkWidget.
2013-02-14 17:19:53 -05:00
Owen W. Taylor
7753883add Use GdkFrameClock for relayout
Add a ::layout signal to GdkFrameClock and use it instead of an idle
handler to drive the restyling and relayout of containers.

https://bugzilla.gnome.org/show_bug.cgi?id=685460
2013-02-14 17:19:47 -05:00
Benjamin Otte
04c85a5b3b container: Redo style validation handling
Instead of using 1 global queue for both resizes and style validation,
use 2 queues. This makes the code a lot simpler and fixes a bug where we
could accidentally stop restylying for very delayed restyles.
2012-04-17 08:59:23 +02:00
Benjamin Otte
97dc45f8a5 container: Split out a function 2012-04-17 08:59:22 +02:00
Benjamin Otte
090f30c559 container: Remove duplicated flag
GtkContainer::need_resize and GtkWidget::alloc_needed are the same
thing.
2012-04-17 08:59:22 +02:00
Benjamin Otte
aebd859ef9 toolbar: Fix widget path creation code
- Ensure arrow button is always included
- Invalidate list when direction changes
2011-09-27 05:37:14 +02:00
Javier Jardón
7b0d77def5 gtkcontainer: Move private functions to private header
https://bugzilla.gnome.org/show_bug.cgi?id=651707
2011-06-06 12:10:29 +01:00