From 1cbf606bd49943cac36778bea824c3c616a37b2e Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Tue, 2 Jun 2026 09:32:45 +0200 Subject: [PATCH] feat(io): widen GUI sidebar and drop its max-width cap Give the map/quests sidebar more room: raise the width fraction (0.28 -> 0.34) and minimum (180 -> 220), and remove the SIDE_MAX upper clamp so the panel keeps scaling with the window instead of stopping at 460px. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../main/java/thb/jeanluc/adventure/io/SwingIO.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Semesterprojekt/src/main/java/thb/jeanluc/adventure/io/SwingIO.java b/Semesterprojekt/src/main/java/thb/jeanluc/adventure/io/SwingIO.java index 77c6004..59bee0c 100644 --- a/Semesterprojekt/src/main/java/thb/jeanluc/adventure/io/SwingIO.java +++ b/Semesterprojekt/src/main/java/thb/jeanluc/adventure/io/SwingIO.java @@ -69,10 +69,9 @@ public class SwingIO implements GameIO { /** Delay between rooms while animating a go-to auto-walk, in milliseconds. */ private static final long TRAVEL_STEP_MS = 300L; - /** Side-panel width as a fraction of the window width, clamped by the bounds below. */ - private static final double SIDE_RATIO = 0.28; - private static final int SIDE_MIN = 180; - private static final int SIDE_MAX = 460; + /** Side-panel width as a fraction of the window width, with a lower bound only. */ + private static final double SIDE_RATIO = 0.34; + private static final int SIDE_MIN = 220; private final MusicController music = new MusicController(new OggMusicBackend()); private final LinkedBlockingQueue inputs = new LinkedBlockingQueue<>(); @@ -191,11 +190,10 @@ public class SwingIO implements GameIO { } } - /** Sizes the side panel to a fraction of the window width, clamped to [min, max] (scaled). */ + /** Sizes the side panel to a fraction of the window width, with a scaled lower bound. */ private void updateSideWidth() { int min = (int) (SIDE_MIN * uiScale); - int max = (int) (SIDE_MAX * uiScale); - int target = Math.max(min, Math.min(max, (int) (frame.getWidth() * SIDE_RATIO))); + int target = Math.max(min, (int) (frame.getWidth() * SIDE_RATIO)); sidePanel.setPreferredSize(new Dimension(target, 0)); questScroll.setPreferredSize(new Dimension(target, (int) (frame.getHeight() * 0.32))); sidePanel.revalidate();