[gtk+] Don't lie about baselines so much
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Don't lie about baselines so much
- Date: Thu, 15 May 2014 12:43:57 +0000 (UTC)
commit 93204d3ba899d928ca0f9240237236e7b2dc13c4
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 15 08:42:24 2014 -0400
Don't lie about baselines so much
Let g_object_get (w, "valign",...) report the truth, so that the
inspector can show it without special cases.
gtk/gtkwidget.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index a7a94d9..eed242b 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3954,7 +3954,7 @@ gtk_widget_get_property (GObject *object,
g_value_set_enum (value, gtk_widget_get_halign (widget));
break;
case PROP_VALIGN:
- g_value_set_enum (value, gtk_widget_get_valign (widget));
+ g_value_set_enum (value, gtk_widget_get_valign_with_baseline (widget));
break;
case PROP_MARGIN_LEFT:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
@@ -14042,7 +14042,9 @@ gtk_widget_get_valign_with_baseline (GtkWidget *widget)
* For backwards compatibility reasons this method will never return
* %GTK_ALIGN_BASELINE, but instead it will convert it to
* %GTK_ALIGN_FILL. If your widget want to support baseline aligned
- * children it must use gtk_widget_get_valign_with_baseline().
+ * children it must use gtk_widget_get_valign_with_baseline(), or
+ * `g_object_get (widget, "valign", &value, NULL)`, which will
+ * also report the true value.
*
* Returns: the vertical alignment of @widget, ignoring baseline alignment
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]