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:
parent
fc0c98805f
commit
18f569280c
@ -28,11 +28,12 @@ const Avatar = new Lang.Class({
|
|||||||
styleClass: 'framed-user-icon' });
|
styleClass: 'framed-user-icon' });
|
||||||
this._iconSize = params.iconSize;
|
this._iconSize = params.iconSize;
|
||||||
|
|
||||||
|
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||||
this.actor = new St.Bin({ style_class: params.styleClass,
|
this.actor = new St.Bin({ style_class: params.styleClass,
|
||||||
track_hover: params.reactive,
|
track_hover: params.reactive,
|
||||||
reactive: params.reactive,
|
reactive: params.reactive,
|
||||||
width: this._iconSize,
|
width: this._iconSize * scaleFactor,
|
||||||
height: this._iconSize });
|
height: this._iconSize * scaleFactor });
|
||||||
},
|
},
|
||||||
|
|
||||||
setSensitive: function(sensitive) {
|
setSensitive: function(sensitive) {
|
||||||
|
Loading…
Reference in New Issue
Block a user