From 4e78638051b25a3fb6ff2ce47ff9a42f711f4982 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 2 Apr 2017 19:02:12 +0200 Subject: matekbd-indicator: don't use deprecated GtkAlignment --- libmatekbd/matekbd-indicator.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/libmatekbd/matekbd-indicator.c b/libmatekbd/matekbd-indicator.c index f5156fe..0273c77 100644 --- a/libmatekbd/matekbd-indicator.c +++ b/libmatekbd/matekbd-indicator.c @@ -388,7 +388,7 @@ matekbd_indicator_prepare_drawing (MatekbdIndicator * gki, int group) } else { char *lbl_title = NULL; char *layout_name = NULL; - GtkWidget *align, *label; + GtkWidget *label; static GHashTable *ln2cnt_map = NULL; layout_name = @@ -403,8 +403,15 @@ matekbd_indicator_prepare_drawing (MatekbdIndicator * gki, int group) &ln2cnt_map, layout_name); - align = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); label = gtk_label_new (lbl_title); + gtk_widget_set_halign (label, GTK_ALIGN_CENTER); + gtk_widget_set_valign (label, GTK_ALIGN_CENTER); + gtk_widget_set_hexpand (label, TRUE); + gtk_widget_set_vexpand (label, TRUE); + gtk_widget_set_margin_start (label, 2); + gtk_widget_set_margin_end (label, 2); + gtk_widget_set_margin_top (label, 2); + gtk_widget_set_margin_bottom (label, 2); g_free (lbl_title); gtk_label_set_angle (GTK_LABEL (label), gki->priv->angle); @@ -414,10 +421,7 @@ matekbd_indicator_prepare_drawing (MatekbdIndicator * gki, int group) ln2cnt_map = NULL; } - gtk_container_add (GTK_CONTAINER (align), label); - gtk_container_add (GTK_CONTAINER (ebox), align); - - gtk_container_set_border_width (GTK_CONTAINER (align), 2); + gtk_container_add (GTK_CONTAINER (ebox), label); } g_signal_connect (G_OBJECT (ebox), -- cgit v1.2.1