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
This commit is contained in:
magcius 2009-12-18 18:50:40 -05:00 committed by Colin Walters
parent 767fe0ebc2
commit 9423cc7fae
2 changed files with 12 additions and 4 deletions

View File

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

View File

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