[gnome-shell] loginDialog: Load logo file texture given resource scale
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] loginDialog: Load logo file texture given resource scale
- Date: Fri, 1 Mar 2019 18:08:10 +0000 (UTC)
commit 26e3ccda496cb62f0b4e3b6e1edbfbb0f738eac2
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date: Thu Nov 30 02:34:42 2017 +0100
loginDialog: Load logo file texture given resource scale
And reload the logo if the resource scale changes.
https://bugzilla.gnome.org/show_bug.cgi?id=765011
js/gdm/loginDialog.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index bf7577c36..6c4d1357d 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -481,6 +481,9 @@ var LoginDialog = GObject.registerClass({
this._logoBin = new St.Widget({ style_class: 'login-dialog-logo-bin',
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.END });
+ this._logoBin.connect('resource-scale-changed', () => {
+ this._updateLogoTexture(this._textureCache, this._logoFile);
+ });
this.add_child(this._logoBin);
this._updateLogo();
@@ -778,12 +781,12 @@ var LoginDialog = GObject.registerClass({
return;
this._logoBin.destroy_all_children();
- if (this._logoFile) {
+ if (this._logoFile && this._logoBin.resource_scale > 0) {
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
this._logoBin.add_child(this._textureCache.load_file_async(this._logoFile,
-1, _LOGO_ICON_HEIGHT,
scaleFactor,
- 1));
+ this._logoBin.resource_scale));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]