From 5fb0e9f1c10d7b34c82df6a055656a806d5ee92a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 14 Apr 2018 17:05:56 +0900 Subject: [PATCH] Don't show scrollbar for reply entry, close #3 --- lib/view/chat-box.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/view/chat-box.js b/lib/view/chat-box.js index 1827ed8..2aeb339 100644 --- a/lib/view/chat-box.js +++ b/lib/view/chat-box.js @@ -48,15 +48,18 @@ class ChatBox { this.view.addChildView(this.browser) this.replyBox = gui.Container.create() - this.replyBox.setStyle({ - padding: 5, - }) + this.replyBox.setStyle({padding: 5}) this.view.addChildView(this.replyBox) this.replyEntry = gui.TextEdit.create() this.replyEntry.setStyle({height: 20}) this.replyEntry.onKeyUp = this.handleKeyUp.bind(this) this.replyEntry.setEnabled(false) + if (process.platform !== 'win32') { + // Force using overlay scrollbar. + this.replyEntry.setOverlayScrollbar(true) + this.replyEntry.setScrollbarPolicy('never', 'automatic') + } this.replyBox.addChildView(this.replyEntry) // TODO Make a beautiful box on all platforms.