[Xfce4-commits] [panel-plugins/xfce4-systemload-plugin] 01/02: Set progressbar minimal width and height depending on the orientation (#12948, #12974)

noreply at xfce.org noreply at xfce.org
Sat Dec 24 23:30:02 CET 2016


This is an automated email from the git hooks/post-receive script.

landry pushed a commit to branch master
in repository panel-plugins/xfce4-systemload-plugin.

commit f82ae5a1c9a92958f4ae74ebaac2d799d3899af8
Author: Landry Breuil <landry at xfce.org>
Date:   Sat Dec 24 23:28:29 2016 +0100

    Set progressbar minimal width and height depending on the orientation (#12948, #12974)
---
 panel-plugin/systemload.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
index 0f73a37..a640f4c 100644
--- a/panel-plugin/systemload.c
+++ b/panel-plugin/systemload.c
@@ -447,9 +447,13 @@ setup_monitor(t_global_monitor *global)
 
 #if GTK_CHECK_VERSION (3, 16, 0)
 #if GTK_CHECK_VERSION (3, 20, 0)
-        css = g_strdup_printf("progressbar trough { min-width: 4px; min-height: 4px; } \
-                               progressbar progress { min-width: 4px; min-height: 4px; \
+        gchar * cssminsizes = "min-width: 4px; min-height: 0px";
+        if (gtk_orientable_get_orientation(GTK_ORIENTABLE(global->monitor[count]->status)) == GTK_ORIENTATION_HORIZONTAL)
+            cssminsizes = "min-width: 0px; min-height: 4px";
+        css = g_strdup_printf("progressbar trough { %s } \
+                               progressbar progress { %s ; \
                                                       background-color: %s; background-image: none; }",
+                                      cssminsizes, cssminsizes,
 #else
         css = g_strdup_printf(".progressbar { background-color: %s; background-image: none; }",
 #endif

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list