diff options
author | raveit65 <[email protected]> | 2017-02-07 21:10:31 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-02-07 21:10:31 +0100 |
commit | f145d407235388b1ea8f866b44ee2bdd1eff58af (patch) | |
tree | 6d6c09a26f010918c693c3d513a49e43424970fb /src/ui/theme-viewer.c | |
parent | d8bbc62e9fdd8e0833c123742493f827f61db9f5 (diff) | |
download | marco-f145d407235388b1ea8f866b44ee2bdd1eff58af.tar.bz2 marco-f145d407235388b1ea8f866b44ee2bdd1eff58af.tar.xz |
theme-viewer: don't use deprecated GtkAlignment
taken from:
https://git.gnome.org/browse/metacity/commit/?id=66d54f5
Diffstat (limited to 'src/ui/theme-viewer.c')
-rw-r--r-- | src/ui/theme-viewer.c | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/src/ui/theme-viewer.c b/src/ui/theme-viewer.c index 9643f07a..cc64ee5c 100644 --- a/src/ui/theme-viewer.c +++ b/src/ui/theme-viewer.c @@ -524,8 +524,7 @@ preview_collection (int font_size, { const char *title = NULL; GtkWidget *contents; - GtkWidget *align; - double xalign, yalign; + GtkAlign xalign, yalign; GtkWidget *eventbox2; GtkWidget *preview; PangoFontDescription *font_desc; @@ -551,19 +550,19 @@ preview_collection (int font_size, if (i == META_FRAME_TYPE_MENU) { - xalign = 0.0; - yalign = 0.0; + xalign = GTK_ALIGN_START; + yalign = GTK_ALIGN_START; } else { - xalign = 0.5; - yalign = 0.5; + xalign = GTK_ALIGN_FILL; + yalign = GTK_ALIGN_FILL; } - align = gtk_alignment_new (0.0, 0.0, xalign, yalign); - gtk_container_add (GTK_CONTAINER (align), eventbox2); + gtk_widget_set_halign (eventbox2, xalign); + gtk_widget_set_valign (eventbox2, yalign); - gtk_box_pack_start (GTK_BOX (box), align, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (box), eventbox2, TRUE, TRUE, 0); switch (font_size) { @@ -746,8 +745,6 @@ previews_of_button_layouts (void) i = 0; while (i < BUTTON_LAYOUT_COMBINATIONS) { - GtkWidget *align; - double xalign, yalign; GtkWidget *eventbox2; GtkWidget *preview; char *title; @@ -767,13 +764,9 @@ previews_of_button_layouts (void) meta_preview_set_button_layout (META_PREVIEW (preview), &different_layouts[i]); - xalign = 0.5; - yalign = 0.5; + gtk_widget_set_halign (eventbox2, GTK_ALIGN_FILL); - align = gtk_alignment_new (0.0, 0.0, xalign, yalign); - gtk_container_add (GTK_CONTAINER (align), eventbox2); - - gtk_box_pack_start (GTK_BOX (box), align, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (box), eventbox2, TRUE, TRUE, 0); previews[META_FRAME_TYPE_LAST*FONT_SIZE_LAST + i] = preview; |