Skip to content

Commit 67b47eb

Browse files
committed
Fix scrollbar being drawn outside the screen area
The calculation for the amount of columns wasn't taking into consideration the width of the scrollbar, which, in specific window resolutions, would cause it to be rendered too far to the right - thus making it inaccessible. To prevent this, I'm now subtracting half of the width of the scrollbar (8). Subtracting the full width (16) would cause too much useful space to be wasted just so the scrollbar is fully rendered (a full column could be drawn in the space it occupies). Subtracting *half* of the width, half of the width is as hidden as it can get.
1 parent aed5f02 commit 67b47eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/control_draw/control_draw.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ if (theme = 2) iconcolor = c_white
7474

7575
// Calculate area
7676
if (show_layers) {
77-
totalcols = floor((rw - 270) / 32)
77+
totalcols = floor((rw - 8 - 270) / 32)
7878
} else {
79-
totalcols = floor(rw / 32)
79+
totalcols = floor((rw - 8) / 32)
8080
}
8181
rhval = 270
8282
if (!show_piano) {

0 commit comments

Comments
 (0)