summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2019-02-07 21:16:53 -0500
committerlukefromdc <[email protected]>2019-02-26 01:48:56 -0500
commitadc2916299e0e22445bb75c8f3d86a68149cb34b (patch)
treee5a0a62ccd8bc16cba0751113cc40b877def85d2
parentd7257167fd0c007e8c29fd84a9be3ffe70d43c9d (diff)
downloadmate-media-adc2916299e0e22445bb75c8f3d86a68149cb34b.tar.bz2
mate-media-adc2916299e0e22445bb75c8f3d86a68149cb34b.tar.xz
Ensure volume slider is always perpendicular to the panel
Apparently there is an issue with getting the applet orientation on a bottom panel
-rw-r--r--mate-volume-control/gvc-stream-status-icon.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mate-volume-control/gvc-stream-status-icon.c b/mate-volume-control/gvc-stream-status-icon.c
index 8b4c80b..f48a370 100644
--- a/mate-volume-control/gvc-stream-status-icon.c
+++ b/mate-volume-control/gvc-stream-status-icon.c
@@ -440,7 +440,14 @@ void
gvc_stream_status_icon_set_orient (GvcStreamStatusIcon *icon,
MatePanelAppletOrient orient)
{
- icon->priv->orient = orient;
+ /*Sometimes orient does not get properly defined especially on a bottom panel
+ *Use the applet orientation if it is valid, otherwise set a vertical slider
+ *Otherwise bottom panels get a horizontal slider
+ */
+ if (orient)
+ icon->priv->orient = orient;
+ else
+ icon->priv->orient = MATE_PANEL_APPLET_ORIENT_DOWN;
}
void