Updating branch refs/heads/master
         to d205f3e9d694ad08887d8b2793b6719ca3ace01d (commit)
       from 25bfe279a604f7cc9e248f294eca595e11771414 (commit)

commit d205f3e9d694ad08887d8b2793b6719ca3ace01d
Author: Harald Judt <h.j...@gmx.at>
Date:   Tue Aug 13 00:56:52 2013 +0200

    Center or left align label depending on layout.

 panel-plugin/xfce4-cpufreq-plugin.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/panel-plugin/xfce4-cpufreq-plugin.c 
b/panel-plugin/xfce4-cpufreq-plugin.c
index 3cb9d4e..7fe718f 100644
--- a/panel-plugin/xfce4-cpufreq-plugin.c
+++ b/panel-plugin/xfce4-cpufreq-plugin.c
@@ -190,6 +190,11 @@ cpufreq_widgets_layout (void)
                        if (cpuFreq->label)
                                gtk_misc_set_alignment (GTK_MISC 
(cpuFreq->label), 0, 0.5);
                }
+               if (cpuFreq->label)
+                       gtk_label_set_justify (GTK_LABEL (cpuFreq->label),
+                                                                  resized
+                                                                  ? 
GTK_JUSTIFY_CENTER : GTK_JUSTIFY_LEFT);
+
                if (cpuFreq->icon)
                        gtk_box_set_child_packing (GTK_BOX (cpuFreq->box),
                                                                           
cpuFreq->icon,
@@ -207,6 +212,11 @@ cpufreq_widgets_layout (void)
                                gtk_misc_set_alignment (GTK_MISC 
(cpuFreq->label), 1.0, 0.5);
                        pos = resized ? 1 : 0;
                }
+               if (cpuFreq->label)
+                       gtk_label_set_justify (GTK_LABEL (cpuFreq->label),
+                                                                  resized
+                                                                  ? 
GTK_JUSTIFY_LEFT : GTK_JUSTIFY_CENTER);
+
                if (cpuFreq->icon)
                        gtk_box_set_child_packing (GTK_BOX (cpuFreq->box),
                                                                           
cpuFreq->icon,
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to