diff options
author | raveit65 <[email protected]> | 2017-04-02 19:02:12 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-04-06 15:17:46 +0200 |
commit | 4e78638051b25a3fb6ff2ce47ff9a42f711f4982 (patch) | |
tree | a4b88b8bdcbcec33d7739c1d9d7ceb95b5e40991 | |
parent | e0e5650c8889586f91f7794272bd26f247971852 (diff) | |
download | libmatekbd-4e78638051b25a3fb6ff2ce47ff9a42f711f4982.tar.bz2 libmatekbd-4e78638051b25a3fb6ff2ce47ff9a42f711f4982.tar.xz |
matekbd-indicator: don't use deprecated GtkAlignment
-rw-r--r-- | libmatekbd/matekbd-indicator.c | 16 |
1 files 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), |