@@ -244,7 +244,7 @@ class Player extends PopupMenu.PopupMenuSection {
244244 // Cover art
245245 this . cover = new St . Icon ( {
246246 icon_name : "media-optical" ,
247- icon_size : Math . trunc ( 300 * global . ui_scale ) ,
247+ icon_size : Math . trunc ( 300 * this . _applet . real_ui_scale ) ,
248248 //icon_type: St.IconType.FULLCOLOR
249249 icon_type : St . IconType . SYMBOLIC
250250 } ) ;
@@ -819,7 +819,7 @@ class Player extends PopupMenu.PopupMenuSection {
819819 style_class : "sound-player-generic-coverart" ,
820820 important : true ,
821821 icon_name : "media-optical" ,
822- icon_size : Math . trunc ( 300 * global . ui_scale ) ,
822+ icon_size : Math . trunc ( 300 * this . _applet . real_ui_scale ) ,
823823 //icon_type: St.IconType.FULLCOLOR
824824 icon_type : St . IconType . SYMBOLIC
825825 } ) ;
@@ -849,8 +849,8 @@ class Player extends PopupMenu.PopupMenuSection {
849849 this . _applet . setAppletIcon ( this . _applet . player , cover_path ) ; // Added
850850 this . _cover_load_handle = St . TextureCache . get_default ( ) . load_image_from_file_async (
851851 cover_path ,
852- Math . trunc ( 300 * global . ui_scale ) ,
853- Math . trunc ( 300 * global . ui_scale ) ,
852+ Math . trunc ( 300 * this . _applet . real_ui_scale ) ,
853+ Math . trunc ( 300 * this . _applet . real_ui_scale ) ,
854854 ( cache , handle , actor ) => {
855855 this . _on_cover_loaded ( cache , handle , actor )
856856 }
@@ -862,8 +862,8 @@ class Player extends PopupMenu.PopupMenuSection {
862862 try {
863863 let pixbuf = GdkPixbuf . Pixbuf . new_from_file_at_size (
864864 this . _cover_path ,
865- Math . trunc ( 300 * global . ui_scale ) ,
866- Math . trunc ( 300 * global . ui_scale )
865+ Math . trunc ( 300 * this . _applet . real_ui_scale ) ,
866+ Math . trunc ( 300 * this . _applet . real_ui_scale )
867867 ) ;
868868 if ( pixbuf ) {
869869 let image = new Clutter . Image ( ) ;
@@ -879,7 +879,7 @@ class Player extends PopupMenu.PopupMenuSection {
879879 if ( this . _applet . keepAlbumAspectRatio ) {
880880 //TODO: Replace Texture by Image.
881881 this . cover = new Clutter . Texture ( {
882- width : Math . trunc ( 300 * global . ui_scale ) ,
882+ width : Math . trunc ( 300 * this . _applet . real_ui_scale ) ,
883883 keep_aspect_ratio : true ,
884884 //filter_quality: 2,
885885 filter_quality : Clutter . Texture . QUALITY_HIGH ,
@@ -888,8 +888,8 @@ class Player extends PopupMenu.PopupMenuSection {
888888 } else {
889889 //TODO: Replace Texture by Image.
890890 this . cover = new Clutter . Texture ( {
891- width : Math . trunc ( 300 * global . ui_scale ) ,
892- height : Math . trunc ( 300 * global . ui_scale ) ,
891+ width : Math . trunc ( 300 * this . _applet . real_ui_scale ) ,
892+ height : Math . trunc ( 300 * this . _applet . real_ui_scale ) ,
893893 keep_aspect_ratio : false ,
894894 filter_quality : Clutter . Texture . QUALITY_HIGH ,
895895 filename : cover_path
@@ -919,10 +919,33 @@ class Player extends PopupMenu.PopupMenuSection {
919919 // (and move the player controls as a result).
920920 //~ log("actor size (wxh): "+actor.width+"x"+actor.height);
921921 //~ actor.set_margin_bottom(Math.max(0, Math.trunc(300 * global.ui_scale - actor.height)));
922- let mb = ( this . _applet . viewFullAlbumArt ) ? 110 : 55 ;
922+ let mb = 55 ;
923+ if ( this . _applet . viewFullAlbumArt ) {
924+ switch ( this . _applet . real_ui_scale ) {
925+ case 0.75 :
926+ mb = 100 ;
927+ break ;
928+ case 1.0 :
929+ mb = 110 ;
930+ break ;
931+ case 1.25 :
932+ mb = 140 ;
933+ break ;
934+ case 1.5 :
935+ mb = 165 ;
936+ break ;
937+ case 1.75 :
938+ mb = 195 ;
939+ break ;
940+ default :
941+ mb = 220 ;
942+ }
943+ }
944+ //~ let mb = (this._applet.viewFullAlbumArt) ? 110 : 55;
945+ //~ mb = Math.round(mb * this._applet.real_ui_scale);
923946 actor . set_margin_bottom ( mb ) ;
924947
925- actor . set_margin_left ( Math . max ( 0 , Math . round ( 300 * global . ui_scale - actor . width * global . ui_scale ) ) ) ;
948+ actor . set_margin_left ( Math . max ( 0 , Math . round ( 300 * this . _applet . real_ui_scale - actor . width ) ) ) ;
926949
927950 this . cover = actor ;
928951
@@ -1003,15 +1026,17 @@ class Seeker extends Slider.Slider {
10031026
10041027
10051028 this . posLabel = new St . Label ( {
1006- text : " 00:00 "
1029+ text : " 00:00 " ,
1030+ style : "font-family: 'Digital Numbers',monospace; "
10071031 } ) ;
10081032 this . posLabel . x_align = St . Align . START ;
10091033 //~ logDebug("this.posLabel: "+this.posLabel);
10101034 //~ this.posLabel.clutterText.line_wrap = false;
10111035 //~ this.posLabel.clutterText.line_wrap_mode = Pango.WrapMode.WORD_CHAR;
10121036 //~ this.posLabel.clutterText.ellipsize = Pango.EllipsizeMode.NONE;
10131037 this . durLabel = new St . Label ( {
1014- text : " 00:00 "
1038+ text : " 00:00 " ,
1039+ style : "font-family: 'Digital Numbers',monospace; "
10151040 } ) ;
10161041 this . durLabel . x_align = St . Align . END ;
10171042 //~ logDebug("this.durLabel: "+this.durLabel);
0 commit comments