From 18f569280ce79cc9836e85b0a2919c4fa5613d2d Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 6 Oct 2014 16:07:32 -0700 Subject: [PATCH] userWidget: Respect the scale factor in the bin size we set Otherwise, the widget will be too small on hi-DPI devices. Based on a patch by: Darcy Beurle https://bugzilla.gnome.org/show_bug.cgi?id=735419 --- js/ui/userWidget.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/ui/userWidget.js b/js/ui/userWidget.js index b16f9e336..314aae0ce 100644 --- a/js/ui/userWidget.js +++ b/js/ui/userWidget.js @@ -28,11 +28,12 @@ const Avatar = new Lang.Class({ styleClass: 'framed-user-icon' }); this._iconSize = params.iconSize; + let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; this.actor = new St.Bin({ style_class: params.styleClass, track_hover: params.reactive, reactive: params.reactive, - width: this._iconSize, - height: this._iconSize }); + width: this._iconSize * scaleFactor, + height: this._iconSize * scaleFactor }); }, setSensitive: function(sensitive) {