diff options
author | raveit65 <[email protected]> | 2017-04-02 19:02:12 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-04-06 15:13:54 +0200 |
commit | 1772caebba651c63de73c75ccd5eea709eddcd65 (patch) | |
tree | 65fa6f1f022466781fb3ba314e06901281687c50 | |
parent | f0dea4769699515994d19b3842b59713bdae0546 (diff) | |
download | libmatekbd-1772caebba651c63de73c75ccd5eea709eddcd65.tar.bz2 libmatekbd-1772caebba651c63de73c75ccd5eea709eddcd65.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), |