windowIcon: Subclass St.BoxLayout
Following the previous work, turn WindowIcon into a St.BoxLayout subclass, and remove the this.actor field from it.
This commit is contained in:
parent
2717ca9d08
commit
4be66ecf01
@ -997,15 +997,17 @@ var ThumbnailList = new Lang.Class({
|
|||||||
|
|
||||||
var WindowIcon = new Lang.Class({
|
var WindowIcon = new Lang.Class({
|
||||||
Name: 'WindowIcon',
|
Name: 'WindowIcon',
|
||||||
|
Extends: St.BoxLayout,
|
||||||
|
|
||||||
_init(window, mode) {
|
_init(window, mode) {
|
||||||
|
this.parent({ style_class: 'alt-tab-app',
|
||||||
|
vertical: true });
|
||||||
|
|
||||||
this.window = window;
|
this.window = window;
|
||||||
|
|
||||||
this.actor = new St.BoxLayout({ style_class: 'alt-tab-app',
|
|
||||||
vertical: true });
|
|
||||||
this._icon = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
this._icon = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||||
|
|
||||||
this.actor.add(this._icon, { x_fill: false, y_fill: false } );
|
this.add(this._icon, { x_fill: false, y_fill: false } );
|
||||||
this.label = new St.Label({ text: window.get_title() });
|
this.label = new St.Label({ text: window.get_title() });
|
||||||
|
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
@ -1070,7 +1072,7 @@ var WindowList = new Lang.Class({
|
|||||||
let win = windows[i];
|
let win = windows[i];
|
||||||
let icon = new WindowIcon(win, mode);
|
let icon = new WindowIcon(win, mode);
|
||||||
|
|
||||||
this.addItem(icon.actor, icon.label);
|
this.addItem(icon, icon.label);
|
||||||
this.icons.push(icon);
|
this.icons.push(icon);
|
||||||
|
|
||||||
icon._unmanagedSignalId = icon.window.connect('unmanaged', (window) => {
|
icon._unmanagedSignalId = icon.window.connect('unmanaged', (window) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user