Commit Graph

29 Commits

Author SHA1 Message Date
Benjamin Otte
9c0acf62b4 widget: Allow adding event controllers in ui files 2018-04-26 17:59:41 +02:00
Benjamin Otte
169203951b widget: Remove clip from size-allocate vfunc
As the clip is no longer needed, get rid of it.
2018-04-05 14:56:38 +02:00
Alexander Larsson
63e060a21d GtkWidget: Start renaming widget->window
This is an automated change doing these command:

git sed -f g gtk_widget_set_has_window gtk_widget_set_has_surface
git sed -f g gtk_widget_get_has_window gtk_widget_get_has_surface
git sed -f g gtk_widget_set_parent_window gtk_widget_set_parent_surface
git sed -f g gtk_widget_get_parent_window gtk_widget_get_parent_surface
git sed -f g gtk_widget_set_window gtk_widget_set_surface
git sed -f g gtk_widget_get_window gtk_widget_get_surface
git sed -f g gtk_widget_register_window gtk_widget_register_surface
git sed -f g gtk_widget_unregister_window gtk_widget_unregister_surface

git checkout NEWS*
2018-03-20 15:21:12 +01:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Matthias Clasen
ffd6baec42 gtk: Intern css names
This avoids a bunch of strdups at startup.
2017-11-17 22:49:57 -05:00
Benjamin Otte
43c212ac28 build: Enable -Wswitch-enum and -Wswitch-default
This patch makes that work using 1 of 2 options:

1. Add all missing enums to the switch statement
  or
2. Cast the switch argument to a uint to avoid having to do that (mostly
   for GdkEventType).

I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.

The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
2017-10-06 21:23:39 +02:00
Timm Bäder
3fc1cafec0 centerbox: Unparent widgets in dispose 2017-09-01 19:05:30 +02:00
Daniel Boles
7dd9f212ad CenterBox: minor tweaks to doc blurb 2017-08-05 18:57:08 +01:00
Daniel Boles
cbe53fec07 CenterBox: Add missing nullable annotations
https://bugzilla.gnome.org/show_bug.cgi?id=785280
2017-08-05 18:56:01 +01:00
Timm Bäder
36ab70ddf5 widget: Add baseline and out_clip parameters to size-allocate
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.

This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
23f90e3d67 centerbox: Add some missing return value annotations 2017-07-19 21:27:15 -04:00
Timm Bäder
82eafb8a2c centerbox: Avoid accessing unset widgets 2017-07-19 21:27:15 -04:00
Matthias Clasen
29e8a07ddd Avoid compiler warnings
Initialize these variables, so gcc doesn't complain.
2017-07-19 20:45:52 -04:00
Matthias Clasen
114f23cec7 center box: Take baseline-position fully into account
We need to take baseline-position into account during measure
as well.
2017-06-10 14:45:10 -04:00
Matthias Clasen
f135b2527f center box: complete the baseline support
When there is no externally allocated baseline, we should
do the same thing that GtkBox does, and determine one from
the children that want baseline alignment.

This commit adds a GtkCenterBox::baseline-position property
with setters and getters.
2017-06-10 09:14:16 -04:00
Matthias Clasen
8316ec85f5 center box: Fix size allocation
This missing pair of parens was causing expanding children
to overlap.
2017-06-10 07:53:06 -04:00
Matthias Clasen
389535c572 center box: Drop a useless line
This is just a leftover that has no effect whatsoever.
2017-06-10 07:53:06 -04:00
Matthias Clasen
5e69fe17ae center box: Add more documentation 2017-06-04 21:48:41 -04:00
Matthias Clasen
c35604cfcb center box: add baseline support
This is copied more or less directly from GtkBoxGadget.
2017-06-04 21:40:20 -04:00
Matthias Clasen
f8737a6d8a center box : implement GtkOrientable
This is generally expected of containers where it makes sense.
2017-06-04 21:40:20 -04:00
Matthias Clasen
141e053e87 center box: support height-for-width
Implement request modes fully.
2017-06-04 21:21:00 -04:00
Matthias Clasen
42921750ff center box: Support expand property
We expand the center child first, but only as far
as we can keep it centered.
2017-06-04 21:21:00 -04:00
Matthias Clasen
60cd5b9b4c center box: implement GtkBuildable
Make it possible to fill the slots by using the
type attribute on child nodes. This is necessary
since GtkCenterBox does not derive from GtkContainer.
2017-06-04 21:21:00 -04:00
Matthias Clasen
b4cb05ace9 center box: implement natural size and rtl flipping
We prefer to give the center widget its natural size,
and we center it as long as possible.
2017-06-04 21:20:57 -04:00
Matthias Clasen
f8059f3040 center box: handle missing start or end widgets
Any slot may be unfilled, not just the center one.
2017-06-04 21:20:33 -04:00
Matthias Clasen
e936a35d66 Make GtkCenterBox public
It provides functionality that GtkBox used to have,
and is generally useful.
2017-06-04 21:20:27 -04:00
Timm Bäder
066c1983ba actionbar: Add explicit center widget
The center widget in GtkBox was only introduced to use it in
GtkActionBar. However, the implementation there is much more complex
than it needs to be, so move the center widget into GtkActionBar instead
and later remove it from GtkBox.
2017-04-25 20:30:37 +02:00
Matthias Clasen
8bfa5e4611 Drop GtkCenterBox
Its functionality has been subsumed in GtkBox.
2014-02-16 23:05:21 -05:00
William Jon McCann
c86ee0558c Rename GtkActionBar to GtkCenterBox
https://bugzilla.gnome.org/show_bug.cgi?id=723929
2014-02-12 08:08:03 -05:00