Skip to content

Commit

Permalink
slintpad: Do not have a bogus scrollbar over the scrollbar
Browse files Browse the repository at this point in the history
Fixes: #4805
  • Loading branch information
hunger committed Mar 12, 2024
1 parent 406bc6d commit 3cf663e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/slintpad/src/editor_widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,9 @@ class EditorPaneWidget extends Widget {

private resize_editor() {
if (this.#editor != null) {
const width = this.contentNode.offsetWidth;
const height = this.contentNode.offsetHeight;
// This has a 1px wide border all around, so subtract 2px...
const width = this.contentNode.offsetWidth - 2;
const height = this.contentNode.offsetHeight - 2;
this.#editor.layout({ width, height });
}
}
Expand Down

0 comments on commit 3cf663e

Please sign in to comment.