fix helper scrollbar visibility
This commit is contained in:
parent
3dd6507d36
commit
4e15c42b86
9
draw.js
9
draw.js
|
|
@ -909,13 +909,14 @@ var DrawingHelper = new Lang.Class({
|
||||||
this.show();
|
this.show();
|
||||||
|
|
||||||
let maxHeight = this.monitor.height*(3/4);
|
let maxHeight = this.monitor.height*(3/4);
|
||||||
if (this.height > maxHeight)
|
|
||||||
this.vscrollbar_policy = Gtk.PolicyType.ALWAYS;
|
|
||||||
else
|
|
||||||
this.vscrollbar_policy = Gtk.PolicyType.NEVER;
|
|
||||||
this.set_height(Math.min(this.height, maxHeight));
|
this.set_height(Math.min(this.height, maxHeight));
|
||||||
this.set_position(Math.floor(this.monitor.width / 2 - this.width / 2),
|
this.set_position(Math.floor(this.monitor.width / 2 - this.width / 2),
|
||||||
Math.floor(this.monitor.height / 2 - this.height / 2));
|
Math.floor(this.monitor.height / 2 - this.height / 2));
|
||||||
|
|
||||||
|
if (this.height == maxHeight)
|
||||||
|
this.vscrollbar_policy = Gtk.PolicyType.ALWAYS;
|
||||||
|
else
|
||||||
|
this.vscrollbar_policy = Gtk.PolicyType.NEVER;
|
||||||
|
|
||||||
Tweener.removeTweens(this);
|
Tweener.removeTweens(this);
|
||||||
Tweener.addTween(this, { opacity: 255,
|
Tweener.addTween(this, { opacity: 255,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue