[gnome-shell] Fix application thumbnail sizing when the height is greater than the width of a window.
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Fix application thumbnail sizing when the height is greater than the width of a window.
- Date: Tue, 5 Jan 2010 01:21:36 +0000 (UTC)
commit 9423cc7fae8c1f326b0452762ed9638f860fe115
Author: magcius <jstpierre mecheye net>
Date: Fri Dec 18 18:50:40 2009 -0500
Fix application thumbnail sizing when the height is greater than the width of a window.
This bug happened because the thumbnail box was only maxed, not set to 256x256.
Standard window thumbnails would max out only the width to 256. Having a window with
its height greater than its width meant that the height would max out, but not the
width, causing thumbnails to look uneven.
https://bugzilla.gnome.org/show_bug.cgi?id=604963
data/theme/gnome-shell.css | 5 +++++
js/ui/altTab.js | 11 +++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index ce39715..91f08af 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -493,6 +493,11 @@ StTooltip {
spacing: 4px;
}
+.switcher-list .thumbnail {
+ width: 256px;
+ height: 256px;
+}
+
.switcher-list .outlined-item-box {
padding: 6px;
border: 2px solid rgba(85,85,85,1.0);
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index 3ed39f8..f211a8b 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -459,7 +459,7 @@ SwitcherList.prototype = {
this._separator = box;
this._list.add_actor(box);
},
-
+
highlight: function(index, justOutline) {
if (this._highlighted != -1)
this._items[this._highlighted].style_class = 'item-box';
@@ -477,7 +477,7 @@ SwitcherList.prototype = {
_itemActivated: function(n) {
this.emit('item-activated', n);
},
-
+
_itemEntered: function(n) {
this.emit('item-entered', n);
},
@@ -592,7 +592,7 @@ AppIcon.prototype = {
this.actor = new St.BoxLayout({ style_class: "alt-tab-app",
vertical: true });
this._icon = this.app.create_icon_texture(POPUP_APPICON_SIZE);
- this.actor.add(this._icon, { x_fill: false, y_fill: false });
+ this.actor.add(this._icon, { x_fill: false, y_fill: false } );
this._label = new St.Label({ text: this.app.get_name() });
this.actor.add(this._label, { x_fill: false });
}
@@ -750,11 +750,14 @@ ThumbnailList.prototype = {
let box = new St.BoxLayout({ style_class: "thumbnail-box",
vertical: true });
+ let bin = new St.Bin({ style_class: "thumbnail" });
let clone = new Clutter.Clone ({ source: windowTexture,
reactive: true,
width: width * scale,
height: height * scale });
- box.add_actor(clone);
+
+ bin.add_actor(clone);
+ box.add_actor(bin);
let title = windows[i].get_title();
if (title) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]