Commit Graph

180 Commits

Author SHA1 Message Date
Marcus Karlsson
ac5fbb5ef3 docs: Add missing transfer annotation to GtkBox
The gtk_box_get_center_widget function is missing a transfer annotation
for the returned widget. No transfer is done, so set transfer to none.

https://bugzilla.gnome.org/show_bug.cgi?id=728093
2014-04-13 13:22:36 -07:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Matthias Clasen
e679812be0 GtkBox: Fix an off-by-one error with center allocation
This error was causing children to not get allocated when
the center widget is the first one in the list of the box's
children.
2014-02-18 22:55:45 -05:00
Matthias Clasen
bb4f8d8ce1 Make gtk_box_set_center_widget take NULL
It makes sense to allow this, and gtk_action_bar_set_center_widget
already assumes that it can pass NULL to this function.
2014-02-18 22:50:37 -05:00
Paolo Borelli
ad9019c2c9 gtkbox: fix positioning of center widget 2014-02-17 23:23:04 +01:00
Matthias Clasen
e734b79fd8 Fix return_if_fail lines in gtk_box_pack
Since the function now returns a value, these checks
need to be updated.
2014-02-17 11:55:56 -05:00
Paolo Borelli
b63ecf8b1a Add builder support for GtkBox center widget 2014-02-17 14:05:36 +01:00
Matthias Clasen
06716a6c79 Add center widget support to GtkBox
This makes GtkCenterBox unnecessary, and at the same time
adds more features: the center widget can be expanded, and
baseline alignment is supported.
2014-02-16 22:57:24 -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
Matthias Clasen
245c385ae7 Docs: Don't use note elements
In most cases, the text itself makes the message clear enough.
2014-02-02 01:22:14 -05:00
William Jon McCann
2d003553e8 docs: don't use <emphasis>
It is a little heavy handed. The text can speak for itself.
2014-01-28 02:02:05 -05:00
Matthias Clasen
05655c5bfa Trivial typo fix 2014-01-27 23:30:38 -05:00
William Jon McCann
4872ee75e6 docs: don't use structfield tags 2014-01-27 19:59:58 -05:00
William Jon McCann
00f15b863e docs: don't use property syntax for child properties 2014-01-21 22:40:55 -05:00
William Jon McCann
0b4ea6ea1b docs: fix typo in property name 2014-01-21 18:57:37 -05:00
William Jon McCann
01018e019b docs: don't use property syntax for child properties 2014-01-21 18:57:37 -05:00
Jasper St. Pierre
698488ddc4 gtkbox: Draw backgrounds and borders 2013-10-31 12:21:08 -04:00
Piotr Drąg
60ec788489 Fix minor typos 2013-08-21 04:15:52 +02: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
80513aa2c7 GtkBox: don't propagate the expand child property
The intention of the expand widget flags was to in fact propagate
legacy expand child properties as well. Due to implementation errors,
this was only happening in some cases, but not in others. To avoid
breaking old code assuming traditional expand flag behavior, this
commit removes all attempts to propagate GtkBox::expand.

This was discussed in
https://bugzilla.gnome.org/show_bug.cgi?id=698656 and
https://bugzilla.gnome.org/show_bug.cgi?id=628902

This patch was written by Tristan Van Berkom.
2013-05-25 14:46:09 -04:00
Benjamin Otte
6146bf7a32 gtkprivate: #define OPPOSITE_ORIENTATION
and use it
2013-05-01 16:41:11 +02:00
Alexander Larsson
43f1ac2b8f GtkBox: Add missing Since in docs 2013-04-23 05:58:08 +02:00
Alexander Larsson
9a42942afb GtkBox: Add baseline alignment for horizontal boxes
Report a baseline based height and baseline whenever there
are children with ALIGN_BASELINE.

Assign baseline to childen in size_allocate. Either the one inherited
from the parent if set, or otherwise calculate one based on any
ALIGN_BASELINE children.
2013-04-23 05:50:38 +02:00
Cosimo Cecchi
61344219d4 Revert "box: Don't special-case RTL hbox child positions anymore"
This reverts commit 6f86e57c4f.

https://bugzilla.gnome.org/show_bug.cgi?id=694451
2013-02-23 14:53:24 -05:00
Benjamin Otte
6f86e57c4f box: Don't special-case RTL hbox child positions anymore
If you want to get rounded corners on an hbox, instead of
  :first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }
you now need to write:
  :first-child, :last-child:dir(rtl) {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
  }
  :last-child, :first-child:dir(rtl) {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
  }
2012-12-18 18:25:42 +01:00
Matthias Clasen
ffa42cb5bb Nuke GtkBoxAccessible
It didn't contain anything useful.
2012-11-07 20:17:30 -05:00
Stefano Facchini
fb18145c06 box: Fix typo
https://bugzilla.gnome.org/show_bug.cgi?id=683718
2012-09-11 21:40:46 +02:00
Cosimo Cecchi
f900df6f01 box: set orientation style classes when setting orientation
Since we override the property, we have to call the internal helper
manually.
2012-05-11 11:46:59 -04:00
Benjamin Otte
33f111a47c widget: Don't cache widget paths all the time
Add an internal API that allows GtkStyleContext to create a widget path
for the widget and with that bypassing gtk_widget_get_path() and that
  function caching the path.
2012-04-17 08:59:21 +02:00
Benjamin Otte
ece9d2fd92 gtk: Make widget only invalidate widget positions
Instead of resetting them completely
2012-04-17 08:59:10 +02:00
Benjamin Otte
461803e407 gtk: Get gtkwidgetpath.h includes out of the public headers
and include them in the C files instead.
2012-03-19 02:26:16 +01:00
Lionel Landwerlin
adf36e28d2 gtkbox: avoid warning when removing a widget with refcount of 1
If gtkbox is the only object having a reference on one of its child
and that we try to remove it from its container, we endup having a
warning when disconnecting a signal after having unparented the
widget.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=670176
2012-03-18 15:41:07 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Javier Jardón
8985ce3b72 gtkbox: Move private functions to private header 2011-10-02 21:30:42 +01:00
Javier Jardón
b0a7db76fb Replace some references to the GtkTable, use GtkGrid instead 2011-09-29 12:38:49 +01:00
Michael Natterer
a6151ebb95 GtkBox: make get_path_for_child() work if there are internal children
Use foreach() instead of forall() to find the child's siblings
because internal children of subclasses have no sibling relation
to the box' children. Also deal with the subclass failing to
implement get_path_for_child(). This caused an infinite widget
path invalidation loop of sorts with GimpMessageBox, which is a
vertical box with a decorative icon to the left.
2011-09-26 00:52:28 +02:00
Matthias Clasen
896769df69 Convert GailExpander to GtkExpanderAccessible
At the same time, drop the AtkText implementation.
Also, reintroduce a GtkBoxAccessible, since the previous
way of setting the role in get_accessible was affecting
GtkBox subclasses negatively.

Adjust expected test output to match.
2011-07-05 16:08:57 -04:00
Matthias Clasen
8bb24a936f Don't overwrite roles
Otherwise, every GtkBox subclass will have to override
get_accessible just to keep their roles.
2011-07-05 16:08:56 -04:00
Matthias Clasen
1ef996ca3c Remove GailBox
It was only setting a role, and we can do that just as well
in get_accessible().
2011-07-05 16:08:53 -04:00
Benjamin Otte
246a7ecbc9 box: Remove cache for sibling paths
We can't cache this path as widgets might dynamically add or remove
style classes without telling us. At which point the stored path does
not work.
2011-07-02 01:40:16 +02:00
Cosimo Cecchi
ef153a5fff box: follow children visibility when building the sibling path
This fixes nth-child not working for widgets which were not
visible before being added to the box, but it's also a better fix
for https://bugzilla.gnome.org/show_bug.cgi?id=652769
2011-07-01 11:48:22 -04:00
Cosimo Cecchi
e731caf8d0 Revert "gtkbox: Invalidate order on changes, even if the child is not visible"
This reverts commit 8cb0cc58e3.
2011-07-01 11:47:41 -04:00
Vincent Untz
8cb0cc58e3 gtkbox: Invalidate order on changes, even if the child is not visible
When we build the sibling path for the order, we do not skip hidden
children (since, quoting the comment, "we cannot reliably detect changes
in widget visibility"). So we need to invalidate the order when hidden
children are reordered and removed.

https://bugzilla.gnome.org/show_bug.cgi?id=652769
2011-06-30 09:11:28 +02:00
Matthias Clasen
9bb5077b90 GtkBox: don't reset styles too often 2011-06-16 22:15:50 -04:00
Matthias Clasen
2204405c9c Expand migration hints for h/v boxes 2011-06-10 17:40:16 -04:00
Murray Cumming
151bcc6dfa Box, etc: Improve docs after H* and V* deprecations.
Stop documenting the base class as just a base class for the
H and V specializations, copying the useful descriptions from
those H/V classes to the base class. Do not advise the use of
the H/V classes or refer to them unnecessarily.
2011-06-10 09:50:45 +02:00
Benjamin Otte
2bc0fca209 box: Add RTL support for sibling paths
We want the reverse path when the box is right-to-left.
2011-06-02 02:03:51 +02:00
Benjamin Otte
cd838480eb box: Add support for siblings in widget paths of box children 2011-06-02 02:03:51 +02:00
Benjamin Otte
bc9c43c1cb box: Only emit pack-type notify if the pack type really changed
This is not very useful in itself, but the code reorg will be useful
once we do style invalidation.
2011-06-02 02:03:51 +02:00
Matthias Clasen
6ca6691966 GtkBoxPrivate: Improve struct packing 2011-04-12 12:24:56 -04:00