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 <darcy@beurle.id.au>

https://bugzilla.gnome.org/show_bug.cgi?id=735419
This commit is contained in:
Jasper St. Pierre 2014-10-06 16:07:32 -07:00
parent fc0c98805f
commit 18f569280c

View File

@ -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) {