Commit Graph

6 Commits

Author SHA1 Message Date
Emmanuele Bassi
a27737b04e Add default GtkLayoutManagerClass.get_request_mode()
Just like GtkContainer provides a default implementation of
GtkWidgetClass.get_request_mode(), we can do the same inside
GtkLayoutManager.

A default implementation preserves the behavior of existing widgets that
moved, or will move, to a GtkLayoutManager.
2019-04-12 17:10:30 +01:00
Benjamin Otte
637bd13f3f boxlayout: Remove unused variable 2019-04-12 16:32:00 +02:00
Emmanuele Bassi
b91fbfd5a0 Fix get_request_mode for GtkBoxLayout
The default GtkWidgetClass.get_request_mode() is implemented by
GtkContainer; now that GtkBox uses a GtkBoxLayout, we need to implement
it inside the layout manager to preserve the same behavior as the old
GtkBox.

Fixes #1821
2019-04-12 13:14:44 +01:00
Georges Basile Stavracas Neto
56d420c06e
boxlayout: Notify orientation changes
This was missing from the initial implementation, and
breaks the tests.
2019-03-27 23:34:03 -03:00
Emmanuele Bassi
65965bed16 Changes after review
- Rename GtkLegacyLayout to GtkCustomLayout
 - Use for() to iterate over children in GtkBinLayout
 - Whitespace fixes for code imported from GtkBox
 - Store the GtkLayoutChild instances inside LayoutManager
 - Simplify the GtkLayoutManager API by dropping unnecessary arguments
 - Fix the ownership model of GtkLayoutManager
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
ef9863ab63 Add GtkBoxLayout
The same layout policy of GtkBox, without all the GtkContainer calories.
2019-03-26 00:11:27 +00:00