fix: window came up short, clipping the bottom of the interface #22

Merged
sickday merged 2 commits from feat/ui-scale into main 2026-08-08 14:07:29 +00:00
Owner

initApplication read getInsets() straight after setVisible() and sized
the frame from the answer -- but at that point the window manager has
not decorated the window yet, so AWT returns a guess. Under KWin the
guess is top=25 where the real title bar is top=56, and the guess is
scaled too, so at uiScale 2 it is top=12. The frame is sized from it and
comes up short by the difference: 26px at 1x, 42px at 2x.

The canvas is added to the frame's default BorderLayout, so it is
stretched to that short content area rather than clipped by it -- the
bottom rows of the interface (chat entry, chat tabs, orb row) are never
drawn, and there is nothing to scroll to. Pre-existing; doubling the
scale doubled the loss and made it obvious.

Frame sizing now targets a CONTENT area of exactly canvasWidth x
canvasHeight: awaited briefly before the first paint (the real insets
land ~15ms later), then re-applied by mainredrawwrapper's existing
periodic canvas pass. Each distinct target is requested once, so a
window manager that refuses a size is not fought with forever.

Measured under KWin at uiScale 2: content area 927 -> 1006 device px.

initApplication read getInsets() straight after setVisible() and sized the frame from the answer -- but at that point the window manager has not decorated the window yet, so AWT returns a guess. Under KWin the guess is top=25 where the real title bar is top=56, and the guess is scaled too, so at uiScale 2 it is top=12. The frame is sized from it and comes up short by the difference: 26px at 1x, 42px at 2x. The canvas is added to the frame's default BorderLayout, so it is stretched to that short content area rather than clipped by it -- the bottom rows of the interface (chat entry, chat tabs, orb row) are never drawn, and there is nothing to scroll to. Pre-existing; doubling the scale doubled the loss and made it obvious. Frame sizing now targets a CONTENT area of exactly canvasWidth x canvasHeight: awaited briefly before the first paint (the real insets land ~15ms later), then re-applied by mainredrawwrapper's existing periodic canvas pass. Each distinct target is requested once, so a window manager that refuses a size is not fought with forever. Measured under KWin at uiScale 2: content area 927 -> 1006 device px.
fix: window came up short, clipping the bottom of the interface
All checks were successful
ci / build (pull_request) Successful in 46s
31a030c102
initApplication read getInsets() straight after setVisible() and sized
the frame from the answer -- but at that point the window manager has
not decorated the window yet, so AWT returns a guess. Under KWin the
guess is top=25 where the real title bar is top=56, and the guess is
scaled too, so at uiScale 2 it is top=12. The frame is sized from it and
comes up short by the difference: 26px at 1x, 42px at 2x.

The canvas is added to the frame's default BorderLayout, so it is
stretched to that short content area rather than clipped by it -- the
bottom rows of the interface (chat entry, chat tabs, orb row) are never
drawn, and there is nothing to scroll to. Pre-existing; doubling the
scale doubled the loss and made it obvious.

Frame sizing now targets a CONTENT area of exactly canvasWidth x
canvasHeight: awaited briefly before the first paint (the real insets
land ~15ms later), then re-applied by mainredrawwrapper's existing
periodic canvas pass. Each distinct target is requested once, so a
window manager that refuses a size is not fought with forever.

Measured under KWin at uiScale 2: content area 927 -> 1006 device px.
Merge branch 'main' into feat/ui-scale
All checks were successful
ci / build (pull_request) Successful in 48s
51f9133d19
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
BlackLobster/Client!22
No description provided.