[Xfce4-commits] [panel-plugins/xfce4-cpugraph-plugin] 11/16: Fix progress bars orientation
noreply at xfce.org
noreply at xfce.org
Wed May 29 04:10:12 CEST 2019
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-cpugraph-plugin.
commit 938c743b30a8970086ffa4b828b58ed2c2e56205
Author: Andre Miranda <andreldm at xfce.org>
Date: Tue Apr 23 00:06:30 2019 -0300
Fix progress bars orientation
---
panel-plugin/cpu.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/panel-plugin/cpu.c b/panel-plugin/cpu.c
index a68557d..266fb15 100644
--- a/panel-plugin/cpu.c
+++ b/panel-plugin/cpu.c
@@ -277,9 +277,13 @@ static void set_bars_orientation( CPUGraph *base, GtkOrientation orientation)
{
guint i, n;
+ /* the received orientation refers to the panel's, so we need to invert it for the bars */
+ orientation = (orientation == GTK_ORIENTATION_HORIZONTAL) ?
+ GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL;
+
n = nb_bars( base );
for( i=0; i < n; i++ )
- gtk_orientable_set_orientation( GTK_ORIENTABLE( base->bars[i] ), orientation );
+ gtk_orientable_set_orientation( GTK_ORIENTABLE( base->bars[i] ), orientation );
}
static gboolean update_cb( CPUGraph * base )
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list