[gtk+] Keep GtkMisc:xalign working for labels
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Keep GtkMisc:xalign working for labels
- Date: Tue, 30 Sep 2014 03:57:42 +0000 (UTC)
commit 059e33eceae38725151174dc39665706e2dd6862
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Sep 29 23:54:13 2014 -0400
Keep GtkMisc:xalign working for labels
Set the new label properties when gtk_misc_set_alignment is used,
to keep things working.
gtk/deprecated/gtkmisc.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gtk/deprecated/gtkmisc.c b/gtk/deprecated/gtkmisc.c
index 279cf8a..bdd6eac 100644
--- a/gtk/deprecated/gtkmisc.c
+++ b/gtk/deprecated/gtkmisc.c
@@ -25,6 +25,7 @@
#include "config.h"
#include "gtkcontainer.h"
#include "gtkmisc.h"
+#include "gtklabel.h"
#include "gtkintl.h"
#include "gtkprivate.h"
@@ -254,6 +255,12 @@ gtk_misc_set_alignment (GtkMisc *misc,
priv->xalign = xalign;
priv->yalign = yalign;
+ if (GTK_IS_LABEL (misc))
+ {
+ gtk_label_set_xalign (GTK_LABEL (misc), xalign);
+ gtk_label_set_yalign (GTK_LABEL (misc), yalign);
+ }
+
/* clear the area that was allocated before the change
*/
widget = GTK_WIDGET (misc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]