@@ -13,6 +13,7 @@ import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js';
1313import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js' ;
1414import * as Slider from 'resource:///org/gnome/shell/ui/slider.js' ;
1515import * as Main from 'resource:///org/gnome/shell/ui/main.js' ;
16+ import * as Config from 'resource:///org/gnome/shell/misc/config.js' ;
1617
1718import { INACTIVE_RESET_TIMEOUT } from './constants.js' ;
1819import * as Radio from './radio.js' ;
@@ -29,6 +30,9 @@ const TIBRPlayerPopup = GObject.registerClass(
2930 } ,
3031 class TIBRPlayerPopup extends PopupMenu . PopupBaseMenuItem {
3132 _init ( player ) {
33+
34+ const shellVersion = parseFloat ( Config . PACKAGE_VERSION ) ;
35+
3236 super . _init ( {
3337 hover : false ,
3438 activate : false ,
@@ -42,18 +46,27 @@ const TIBRPlayerPopup = GObject.registerClass(
4246 this . player = player ;
4347
4448 this . box = new St . BoxLayout ( {
45- vertical : true ,
49+ ...( this . shellVersion >= 48
50+ ? { orientation : Clutter . Orientation . VERTICAL }
51+ : { vertical : true }
52+ ) ,
4653 width : 250 ,
4754 } ) ;
4855
4956 // Volume control section
5057 this . volBox = new St . BoxLayout ( {
51- vertical : false ,
58+ ...( this . shellVersion >= 48
59+ ? { orientation : Clutter . Orientation . HORIZONTAL }
60+ : { vertical : false }
61+ ) ,
5262 width : 250 ,
5363 } ) ;
5464
5565 this . loadingBox = new St . BoxLayout ( {
56- vertical : false ,
66+ ...( this . shellVersion >= 48
67+ ? { orientation : Clutter . Orientation . HORIZONTAL }
68+ : { vertical : false }
69+ ) ,
5770 x_align : Clutter . ActorAlign . CENTER ,
5871 style_class : 'tibr-loading-box' ,
5972 } ) ;
@@ -104,7 +117,10 @@ const TIBRPlayerPopup = GObject.registerClass(
104117
105118 // Track metadata container
106119 this . metadataBox = new St . BoxLayout ( {
107- vertical : true ,
120+ ...( this . shellVersion >= 48
121+ ? { orientation : Clutter . Orientation . VERTICAL }
122+ : { vertical : true }
123+ ) ,
108124 style_class : 'tibr-metadata-box' ,
109125 } ) ;
110126
@@ -124,7 +140,10 @@ const TIBRPlayerPopup = GObject.registerClass(
124140 } ) ;
125141
126142 this . artistInfoBox = new St . BoxLayout ( {
127- vertical : false ,
143+ ...( this . shellVersion >= 48
144+ ? { orientation : Clutter . Orientation . VERTICAL }
145+ : { vertical : true }
146+ ) ,
128147 x_align : Clutter . ActorAlign . CENTER ,
129148 x_expand : true ,
130149 style_class : 'tibr-info-box' ,
@@ -166,7 +185,10 @@ const TIBRPlayerPopup = GObject.registerClass(
166185 this . artistInfoBox . add_child ( this . artistCopyButton ) ;
167186
168187 this . albumInfoBox = new St . BoxLayout ( {
169- vertical : false ,
188+ ...( this . shellVersion >= 48
189+ ? { orientation : Clutter . Orientation . VERTICAL }
190+ : { vertical : true }
191+ ) ,
170192 x_align : Clutter . ActorAlign . CENTER ,
171193 x_expand : true ,
172194 style_class : 'tibr-info-box' ,
0 commit comments