From adc2916299e0e22445bb75c8f3d86a68149cb34b Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Thu, 7 Feb 2019 21:16:53 -0500 Subject: Ensure volume slider is always perpendicular to the panel Apparently there is an issue with getting the applet orientation on a bottom panel --- mate-volume-control/gvc-stream-status-icon.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'mate-volume-control') 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 -- cgit v1.2.1