Commit Graph

56 Commits

Author SHA1 Message Date
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
Cosimo Cecchi
06c8e8fa43 docs: fix some typos in newly introduced methods 2013-04-24 13:10:54 -04:00
Alexander Larsson
ebbc7791dd GtkGrid: Add missing Since docs 2013-04-23 05:58:07 +02:00
Alexander Larsson
627685e2a2 GtkGrid: Support baseline alignment in GtkGrid
We support a local baseline in each row, as well as selecting
a specific row for the global baseline of the entire GtkGrid.
2013-04-23 05:58:07 +02:00
Matthias Clasen
cc86a7bb7e Add gtk_grid_remove_{row,column}
It is sometimes convenient to deal with entire rows or
columns at a time.
https://bugzilla.gnome.org/show_bug.cgi?id=695994
2013-03-23 15:43:37 -04:00
Matthias Clasen
5e1a06d1b1 GtkGrid: Tweak size allocation
If there are rows that contain only spanning children,
our algorithm was unnecessarily distributing extra space
to the other rows, even if they contain only non-expanding
children.

We improve the behaviour by treating rows containing only
spanning children as expanding.
2013-03-15 23:38:30 -04:00
Bastian Winkler
b0ea45863d grid: Fix access to grid->priv member
The priv member should be accessed after the g_return_if_fail test

https://bugzilla.gnome.org/show_bug.cgi?id=677363
2012-06-03 01:51:26 +02:00
Bastian Winkler
4fee1aa22b grid: Add missing guard to gtk_grid_get_child_at()
Add missing guard to make sure it's called with a GtkGrid argument.

https://bugzilla.gnome.org/show_bug.cgi?id=677363
2012-06-03 01:50:28 +02:00
Martin Pitt
ec39974714 grid: add missing transfer annotation
gtk_grid_get_child_at() is missing a transfer annotation for the returned
widget, making it not introspectable.
2012-05-16 18:00:04 +02:00
Matthias Clasen
0c6d158373 GtkGrid: Add a note about overlapping children
https://bugzilla.gnome.org/show_bug.cgi?id=669989
2012-04-28 02:19:45 -04:00
Matthias Clasen
ed17c74f58 grid: avoid a floating point exception
When a homogeneous grid has no visible children, we were
accidentally doing a division by zero. Instead, just bail
out early in this case, there is nothing to allocate anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=672763
2012-03-24 17:19:46 -04:00
Matthias Clasen
47c190a1b7 grid: Work harder for tight homogeneous allocation
When doing homogeneous allocation in the presence of
overlapping spanning children, we need to avoid uneven
line allocations, otherwise, the final homogenization
will blow up the size request of the grid.

https://bugzilla.gnome.org/show_bug.cgi?id=671170
2012-03-04 17:29:01 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
362ff7bedf Fix gtk_grid_attach_next_to
The function did not behave as intended when @sibling is NULL.
Also add an example to the docs to clarify the intended behaviour.
2011-10-25 23:21:13 -04:00
Matthias Clasen
bb1d9aba86 Fix natural/min widht calculations for empty grids
https://bugzilla.gnome.org/show_bug.cgi?id=660139
2011-10-21 16:24:55 -04:00
Torsten Schönfeld
a95c4c1bb4 gtk: fix syntax of an annotation 2011-10-15 19:37:43 +02:00
Benjamin Otte
d717a2dcfc grid: Swap wrong spacing properties
row-spacing behaved like column-spacing should have and vice versa.

Also update tests that erroneously checked this behavior.

Thanks to Joanmarie Diggs for finding this.
2011-09-05 18:56:23 +02:00
Matthias Clasen
ef4690d511 GtkGrid: make attaching more flexible
Allow to attach children at either end of row/column 0.
Proposed by Alex Larsson.

https://bugzilla.gnome.org/show_bug.cgi?id=657793
2011-09-02 20:07:19 -04:00
Matthias Clasen
f64647077f Add an accessor for grid children
This addresses concerns in bug 634136.
2011-08-28 21:20:53 -04:00
Matthias Clasen
17f99f663f GtkGrid: Add a way to insert rows or columns
This is useful functionality that makes it easier to insert
things in the middle of an already populated grid.

Bug 653817
2011-08-08 13:13:48 +02:00
Matthias Clasen
d4224cd325 GtkGrid: Fix a size allocation problem
We need pay attention the the request mode when doing size allocation.
The code was using request mode for requisition, but orientation
for allocation.

Also add a reftest that exhibits the issue, courtesy of
Benjamin Otte.
2011-06-07 11:05:50 -04:00
Matthias Clasen
b219b3b0ec Add shortcuts for the !children case
Not that we are doing too much work in that case, but we are
segfaulting, which is bad.
https://bugzilla.gnome.org/show_bug.cgi?id=649972
2011-05-12 20:12:51 -04:00
Benjamin Otte
8331b45a5f grid: Fix homogeneuous properties being flipped 2011-04-27 00:42:44 +02:00
Matthias Clasen
7a65db0402 GtkGrid: Add forgotten RTL flipping
How did we manage to add a non-RTL savy container in GTK+ 3.0 ?
2011-03-30 08:19:30 -04:00
Tristan Van Berkom
887142f1f5 Added GTK_SIZE_REQUEST_CONSTANT_SIZE to GtkSizeRequestMode
The constant size request mode defines a request mode where
height-for-width geometry is unneeded, thus optimizing GTK+
by reducing the overall amount of requests that need to be
performed and cached while resizing an interface.
2011-03-25 18:42:07 +09:00
Matthias Clasen
1692829594 GtkGrid: Avoid problems with uninitialized memory
valgrind complained about these, and they make for bad size allocation
and the occasional crash.
2011-02-17 11:53:38 -05:00
Matthias Clasen
4a0aa41742 Add gtkorientableprivate.h header 2011-01-30 03:12:49 -05:00
Carlos Garnacho
e2e7075533 Redo patch in efae64b (Set vertical/horizontal class...)
Add a _gtk_orientable_set_style_classes() function so all
orientation changes to style happen in a single place.
2011-01-12 22:58:41 +01:00