Scale the interface fractionally on Linux
Java2D on X11 (and so under XWayland) truncates its scale to a whole number, drawing 150 % at 100 %. On Linux, pin Java2D to 1 and hand the full factor to FlatLaf, taken from XSETTINGS Xft/DPI, KWin's Xwayland scale or GDK_SCALE, or chosen in Options → Design. The client's own sizes now go through UIScale: borders, gaps, dialog and row sizes, icons (rendered at the scaled size, so they stay crisp), custom-painted components and font sizes in the HTML views. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -154,6 +154,8 @@ public final class Settings {
|
||||
|
||||
/** Look-and-feel variant; see {@link Appearance}. */
|
||||
public Appearance appearance = Appearance.LIGHT;
|
||||
/** Interface scale factor, 1.0 being 100 %; 0 follows the desktop. Read at startup. */
|
||||
public double uiScale = 0;
|
||||
|
||||
// ---- window chrome ----
|
||||
/** Whether the status bar at the bottom of the window is shown. */
|
||||
@@ -263,6 +265,7 @@ public final class Settings {
|
||||
iconPack = props.getProperty("iconPack", iconPack);
|
||||
iconPackDir = props.getProperty("iconPackDir", iconPackDir);
|
||||
appearance = parseAppearance(props.getProperty("appearance"), appearance);
|
||||
uiScale = parseD(props.getProperty("uiScale"), uiScale);
|
||||
showStatusBar = parseB(props.getProperty("showStatusBar"), showStatusBar);
|
||||
showMasterVolumeSlider = parseB(props.getProperty("showMasterVolumeSlider"), showMasterVolumeSlider);
|
||||
infoSplitRatio = parseD(props.getProperty("infoSplitRatio"), infoSplitRatio);
|
||||
@@ -311,6 +314,7 @@ public final class Settings {
|
||||
props.setProperty("iconPack", iconPack);
|
||||
props.setProperty("iconPackDir", iconPackDir);
|
||||
props.setProperty("appearance", appearance.name());
|
||||
props.setProperty("uiScale", Double.toString(uiScale));
|
||||
props.setProperty("showStatusBar", Boolean.toString(showStatusBar));
|
||||
props.setProperty("showMasterVolumeSlider", Boolean.toString(showMasterVolumeSlider));
|
||||
props.setProperty("infoSplitRatio", Double.toString(infoSplitRatio));
|
||||
|
||||
Reference in New Issue
Block a user