feat: display scale for HiDPI screens (ui.scale / --scale) #21

Merged
sickday merged 1 commit from feat/ui-scale into main 2026-08-08 13:46:50 +00:00
Owner

The client draws a fixed 765x503 window. Where the desktop hands old
applications the raw panel resolution and expects them to scale
themselves -- KDE Plasma 6's "legacy applications: apply scaling
themselves", written as [Xwayland] Scale in kwinrc -- Java finds no
Xft.dpi, reports 96 dpi and draws that window at 1:1. On a HiDPI or
scaled ultrawide panel it comes up postage-stamp sized and reads as a
broken client rather than as a display setting.

Sets sun.java2d.uiScale, from ui.scale in config/server.properties
(applied in main() before the first Frame, so it covers double-clicking
the jar and run.bat too) or from run.sh's --scale / $BL_UI_SCALE. With
none of those set, run.sh probes Plasma's own setting and then GDK_SCALE
on Linux, so the machine that has the problem needs no configuration;
macOS is skipped, as AWT handles Retina unaided.

The client blits a fixed-resolution raster, so this is an upscale:
correct physical size, slightly softer pixels.

run-client.sh becomes a wrapper around run.sh -- one launch path rather
than two that drift -- and run.sh honours $JAVA, which it had.

The client draws a fixed 765x503 window. Where the desktop hands old applications the raw panel resolution and expects them to scale themselves -- KDE Plasma 6's "legacy applications: apply scaling themselves", written as [Xwayland] Scale in kwinrc -- Java finds no Xft.dpi, reports 96 dpi and draws that window at 1:1. On a HiDPI or scaled ultrawide panel it comes up postage-stamp sized and reads as a broken client rather than as a display setting. Sets sun.java2d.uiScale, from ui.scale in config/server.properties (applied in main() before the first Frame, so it covers double-clicking the jar and run.bat too) or from run.sh's --scale / $BL_UI_SCALE. With none of those set, run.sh probes Plasma's own setting and then GDK_SCALE on Linux, so the machine that has the problem needs no configuration; macOS is skipped, as AWT handles Retina unaided. The client blits a fixed-resolution raster, so this is an upscale: correct physical size, slightly softer pixels. run-client.sh becomes a wrapper around run.sh -- one launch path rather than two that drift -- and run.sh honours $JAVA, which it had.
feat: display scale for HiDPI screens (ui.scale / --scale)
All checks were successful
ci / build (pull_request) Successful in 1m19s
104b01de43
The client draws a fixed 765x503 window. Where the desktop hands old
applications the raw panel resolution and expects them to scale
themselves -- KDE Plasma 6's "legacy applications: apply scaling
themselves", written as [Xwayland] Scale in kwinrc -- Java finds no
Xft.dpi, reports 96 dpi and draws that window at 1:1. On a HiDPI or
scaled ultrawide panel it comes up postage-stamp sized and reads as a
broken client rather than as a display setting.

Sets sun.java2d.uiScale, from ui.scale in config/server.properties
(applied in main() before the first Frame, so it covers double-clicking
the jar and run.bat too) or from run.sh's --scale / $BL_UI_SCALE. With
none of those set, run.sh probes Plasma's own setting and then GDK_SCALE
on Linux, so the machine that has the problem needs no configuration;
macOS is skipped, as AWT handles Retina unaided.

The client blits a fixed-resolution raster, so this is an upscale:
correct physical size, slightly softer pixels.

run-client.sh becomes a wrapper around run.sh -- one launch path rather
than two that drift -- and run.sh honours $JAVA, which it had.
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!21
No description provided.