Skip to content

Make input fields trustworthy and use wide windows deliberately - #8

Merged
Gaiser147 merged 1 commit into
mainfrom
manager-input-scaling
Oct 27, 2026
Merged

Gaiser147 merged 1 commit into
mainfrom
manager-input-scaling

Conversation

@Gaiser147

Copy link
Copy Markdown
Owner

What changed

Input fields

  • Mouse wheel: spin boxes and combo boxes (settings, key fields, FamSwap controls, image target and video pickers) only react to the wheel while focused. Before, scrolling the settings list changed whichever field was under the pointer (e.g. Movement speed 400 → 350, Camera mode possess → viewtarget, Toggle camera F5 → F6) and only "Unsaved changes" hinted at it.
  • Decimal marks: under a German locale . is a thousands separator, so typing 1.5 saved 15 and 12.5 saved 125, while help and tooltips printed values with a dot. The new NumberField accepts both . and , as the decimal mark and never shows thousands separators. Help, tooltips and reset text format numbers the same way. Whole-number fields read 1.000 as a thousand.
  • Out-of-range input: Qt silently dropped keystrokes, so 99999 in a 1–20 field became 9. Input is now corrected when leaving the field or pressing Enter, and a pink note under the label says what happened ("Maximum is 20.", "Rounded to 2 decimal places."). Field tooltips state range and default.
  • Key capture: a keyboard button beside each key field assigns the next pressed key. Esc cancels, and numpad or other unsupported keys are explained in the status bar. The list stays available.
  • FamSwap size and offsets use whole percentages (100 % instead of 100,00 %).

Window sizes and display scaling

  • Settings rows stop at 760 px and align left, so values stay next to their labels on 1920/2560-wide windows (previously up to ~1500 px apart). The key sheet grows from 280 to 340 px from a 1600 px window. The smoke texture fills the remaining space.
  • The logo and the image preview are scaled in device pixels, so they stay sharp at 150 % and 200 % display scaling (both were upscaled and blurry before).

Why

These come from a second design critique focused on input usability and scaling (26/40). This PR addresses all five priority issues it found.

Notes for reviewers

  • New module manager/fields.py: NumberField, ChoiceField (wheel guard) and KeyCaptureButton.
  • PySide ignores text returned from QAbstractSpinBox.fixup(), so corrections happen in focusOutEvent/Enter before Qt would fall back to the previous value.
  • Tests: 5 new UI tests (wheel guard, both decimal marks, corrections and notes, help formatting under a German locale, key capture, wide layout). Full suite: 193 OK, 3 skipped.
  • Offscreen renders checked at 900×640, 1280×860, 1600×1000 and 2560×1440, plus 200 % scaling, against a local installation (read-only). Not checked on a real HiDPI monitor, a Steam Deck or Linux.

Scrolling the settings with the mouse wheel changed whichever field was
under the pointer, even without focus. Spin and combo boxes now take wheel
input only while focused and otherwise let the page scroll.

Under a German locale "." is a thousands separator, so typing "1.5" saved
15 and "12.5" saved 125, while help and tooltips printed values with a dot.
Number fields now accept both marks, show no thousands separators, and help,
tooltips and reset text use the same formatting. Whole-number fields read
"1.000" as a thousand.

Out-of-range or over-precise input was silently truncated ("99999" became 9
in a 1-20 field). It is now corrected when leaving the field and a note under
the label names the correction; tooltips state range and default.

- Assign a key by pressing it via a keyboard button beside each key field.
- Stop settings rows at 760 px and widen the key sheet to 340 px from a
  1600 px window.
- Scale the logo and image preview in device pixels so they stay sharp at
  150 % and 200 % display scaling; image controls use whole percentages.
@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: de091aa4-331a-4122-b8bf-be5f5412429a
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Gaiser147
Gaiser147 merged commit 9fc3462 into main Oct 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant