Matthias Clasen
ffd6baec42
gtk: Intern css names
...
This avoids a bunch of strdups at startup.
2017-11-17 22:49:57 -05:00
Matthias Clasen
fb8589671d
Drop unused includes of gtkrender.h
...
We don't use the gtk_render apis internally anymore.
Drop these includes so it is clear where the remaining
uses are.
2017-10-25 21:46:46 -04:00
Timm Bäder
b3fedda29e
grid: Only pass baselines to children that request it
2017-10-11 08:50:21 +02:00
Timm Bäder
e7e3ef9d3e
grid: Simplify allocating children
...
allocation->x and allocation->y are always 0. MAX'ing width/height with
1 is also wrong now since 0 is a valid width/height for widgets.
2017-10-11 08:50:21 +02:00
Timm Bäder
b994cac6dd
grid: Drop priv pointer
2017-10-10 09:49:35 +02: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
a8a755e5cd
widget: Remove gtk_widget_set_redraw_on_alloc
...
Since gtk+ draws more than the widget and allocates more size to it than
it knows about, this flag doesn't work anymore. Removing it (or setting
it to TRUE for widgets that used to set it to FALSE) fixes drawing
invalidation when these widgets get allocated a new size.
2017-08-09 16:26:26 +02: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
ede6f2ab59
Slightly rework clip handling
...
always initialize clips to the (content) allocation, don't walk up the
widget hierarchy in gtk_widget_set_clip, implement
gtk_widget_size_allocate in GtkSeparator. This way we don't end up using
uninitialized clip values.
The entire clip handling is up for major rework since we can't and don't
want to force every single widget to call _set_clip in size-allocate
implementations.
2017-07-19 21:27:12 -04:00
Timm Bäder
e8bedcbff8
grid: Remove gadget
2017-07-19 21:27:11 -04:00
Timm Bäder
5a575c3594
gtkgrid: Remove css box drawing
2017-07-19 21:27:10 -04:00
Timm Bäder
70aeeab355
grid: Remove unnecessary NULL checks
...
The minimum and natural pointers passed to measure are never NULL and
that's the only place where we call gtk_grid_get_size_for_size.
2017-04-28 11:27:09 +02:00
Timm Bäder
179b8b0cbc
Fix gdk_rectangle_union calls
...
Turns out that the destination is the last parameter, not the first one.
This fixes the flickering in the first page of the widget-factory when
using the expander on page 2.
2017-04-28 11:27:09 +02:00
Timm Bäder
74ef45bfbf
grid: Compute clip directly
...
Instead of iterating over the children again in
gtk_container_get_children_clip
2017-04-25 20:30:37 +02:00
Timm Bäder
f053a63d74
container: Remove include_internals parameter from forall
...
with include_internals=TRUE, this is the same as the (still private)
gtk_widget_forall, or just using the children/sibling accessors in a
loop.
2017-04-25 20:30:37 +02:00
Daniel Boles
5e816f7283
grid: Fix plural error in docs' @Short_description
2017-01-15 20:37:49 +00:00
Alexander Larsson
7bee22bcb6
Avoid some more type checks for internal calls
2017-01-11 15:27:51 +01:00
Benjamin Otte
0dbdf0c428
gadget: Remove gtk_css_gadget_draw()
...
And with it, remove the draw func from custom gadgets, that has been
NULL everywhere.
All gadgets are snapshot now.
2016-12-20 18:01:12 +01:00
Benjamin Otte
0eecc6f686
grid: Implement support for CSS border-spacing
2016-12-10 04:32:55 +01:00
Benjamin Otte
cc1b422f64
snapshot: Convert GtkGrid
2016-11-15 17:48:45 +01:00
Benjamin Otte
da207c9fdd
snapshot: Add a snapshot function to GtkCssCustomGadget
2016-11-15 17:48:45 +01:00
Timm Bäder
997fd3c81e
grid: Use gtk_wiget_measure
2016-11-12 20:37:10 +01:00
Timm Bäder
9992a616ef
widget: Use ::measure vfunc to measure size
...
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
2016-10-22 19:05:47 +02:00
Matthias Clasen
72ccb39f66
Convert GtkGrid to indirect rendering
...
Following the example of GtkBox.
2016-10-18 11:49:11 +01:00
Timm Bäder
d844abe066
Remove GtkTable
2016-10-18 00:29:18 +02:00
Benjamin Otte
4df6ddad54
API: container: Remove gtk_container_set_border_width()
2016-10-16 18:18:58 +02:00
Timm Bäder
fb3d9022ad
Remove GtkHBox
2016-10-16 18:17:21 +02:00
Matthias Clasen
2f544655f9
Revise CSS node documentation
...
Clarify the use of brackets in the CSS node diagrams:
[] means optional nodes or classes, <> means child widgets.
2015-12-16 10:58:47 -05:00
Matthias Clasen
f3561eaa9b
grid: Convert to gadgets
2015-12-15 08:41:16 -05:00
Timm Bäder
a28103cf51
Add some more missing nullable annotations
2015-12-01 13:41:35 +01:00
Timm Bäder
86f4346c29
GtkGrid: Remove invalid return annotation
2015-11-13 14:12:35 +01:00
Matthias Clasen
2580c050d8
grid: Convert to gtk_container_child_notify_by_pspec
...
For the same reasons as g_object_child_notify_by_pspec.
2015-09-08 08:07:32 -04:00
Matthias Clasen
0f92a43e10
Move GtkWidgetPrivate to gtkwidgetprivate.h
...
This lets us use inlined getters for members in there,
avoiding the type checks in the public getters.
2015-09-07 02:40:22 -04:00
Matthias Clasen
7fd307f881
Revert "GtkGrid: Add a few NULL checks"
...
This reverts commit e215db6da2
.
We are actually requiring non-NULL out arguments here now.
2015-07-17 20:18:34 -04:00
Matthias Clasen
e215db6da2
GtkGrid: Add a few NULL checks
...
Coverity complained about these.
2015-07-17 18:38:59 -04:00
Benjamin Otte
d3c147a62d
stylecontext: Split render functions out into gtkrender.[ch]
2014-10-03 06:18:05 +02:00
Benjamin Otte
b5a8b7ef3b
widget: Make _gtk_set_simple_clip() take an optional content clip
2014-08-21 00:54:07 +02:00
Matthias Clasen
cd6c880790
GtkGrid: Set orientable style classes initially
...
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:38:37 -04:00
Matthias Clasen
efc2166c25
GtkGrid: Use G_PARAM_EXPLICIT_NOTIFY
2014-06-09 13:31:03 -04:00
Benjamin Otte
0cd63faee2
widget: Add _gtk_widget_set_css_clip()
...
... and use it in GtkBox and GtkGrid.
2014-05-24 16:12:21 +02:00
Juan Pablo Ugarte
018c394c52
GtkGrid: gtk_grid_get_size_for_size() do not dereference a NULL pointer.
2014-05-01 19:54:43 -03:00
Benjamin Otte
f72b496a45
grid: Remove unneeded checks
...
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:28 +02:00
William Jon McCann
13998c55e7
docs: use proper quotations instead of '*'
2014-02-07 14:22:39 -05:00
William Jon McCann
7a208fbbf3
docs: use proper apostrophe
...
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
0ce016650b
docs: Use markup for links
2014-02-07 09:42:12 -05:00
Matthias Clasen
0e9a245e0f
GtkGrid: fix property installation
...
The previous commit was misapplied.
2014-01-25 13:49:27 -05:00
Javier Jardón
65ce9a523a
gtkgrid: Use g_object_class_install_properties() and g_object_notify_by_pspec()
...
https://bugzilla.gnome.org/show_bug.cgi?id=634793
2014-01-24 22:55:09 -05:00
Paolo Borelli
144a92ef11
grid: draw css background and borders
...
https://bugzilla.gnome.org/show_bug.cgi?id=711324
2013-11-03 14:13:16 +01:00
Emmanuele Bassi
0899ef7cc9
gtk: Use new macros for defining private data
...
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
Matthias Clasen
13858fde29
GtkGrid: Undo a size allocation tweak
...
Revert 5e1a06d1b1
This change caused empty rows to 'open up', which was not
intended and causes problems as seen in bug 698660.
2013-04-28 18:46:41 -04:00