From 4e15c42b86807c5ae097261b1e93c5f1114db03e Mon Sep 17 00:00:00 2001 From: abakkk Date: Mon, 11 Mar 2019 18:24:10 +0100 Subject: [PATCH] fix helper scrollbar visibility --- draw.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/draw.js b/draw.js index 345e6c2..2a4f0ff 100644 --- a/draw.js +++ b/draw.js @@ -909,13 +909,14 @@ var DrawingHelper = new Lang.Class({ this.show(); 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_position(Math.floor(this.monitor.width / 2 - this.width / 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.addTween(this, { opacity: 255,