[gnome-shell] userWidget: Respect the scale factor in the bin size we set
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] userWidget: Respect the scale factor in the bin size we set
- Date: Tue, 7 Oct 2014 00:03:22 +0000 (UTC)
commit 18f569280ce79cc9836e85b0a2919c4fa5613d2d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Oct 6 16:07:32 2014 -0700
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
js/ui/userWidget.js | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/userWidget.js b/js/ui/userWidget.js
index b16f9e3..314aae0 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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]