overviewControls: Fix reallocation cycles
Instead of setting a new height, let the Clutter relayout machinery do the work for us.
This commit is contained in:
parent
53a595885a
commit
e19a927579
@ -3,6 +3,7 @@
|
|||||||
const Clutter = imports.gi.Clutter;
|
const Clutter = imports.gi.Clutter;
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
const Shell = imports.gi.Shell;
|
||||||
|
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const Tweener = imports.ui.tweener;
|
const Tweener = imports.ui.tweener;
|
||||||
@ -305,14 +306,11 @@ const SlidingControlContainer = new Lang.Class({
|
|||||||
child.x_expand = true;
|
child.x_expand = true;
|
||||||
this.add_actor(child);
|
this.add_actor(child);
|
||||||
|
|
||||||
let entryClone = new St.Widget();
|
let entryClone = new Shell.GenericContainer();
|
||||||
entryClone.height = entryBin.height;
|
entryClone.connect('get-preferred-height', function(actor, forWidth, alloc) {
|
||||||
|
[alloc.min_size, alloc.natural_size] = [entryBin.height, entryBin.height];
|
||||||
|
});
|
||||||
this.add_actor(entryClone);
|
this.add_actor(entryClone);
|
||||||
|
|
||||||
entryBin.connect('notify::height', Lang.bind(this,
|
|
||||||
function() {
|
|
||||||
entryClone.height = entryBin.height;
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user