Solaar/lib/solaar/ui
Ken Sanislo 6c99d2f9d1 PerKey dialog: size window from measured natural size
The dialog used hardcoded offsets to compute its target size from the
canvas's size_request:

    target_w = canvas_w + 32  # 8 wrapper border * 2 + ~16 scrollbar slack
    target_h = canvas_h + 80  # 8 wrapper border * 2 + 50 toolbar + slack

Two problems with that:

1. The "+32" only covered the canvas's width plus borders, not the
   toolbar's width. Small layouts (e.g. an 8-LED mouse: canvas ~172px)
   produced a window narrower than the toolbar wanted (~261px with
   the icon buttons + palette + color picker + unset toggle), causing
   toolbar overflow / clipping.

2. The "+80" assumed a fixed toolbar height and scrollbar slack —
   wrong on themes with chunkier buttons or different scrollbar
   metrics, and brittle to any future toolbar additions.

Replace with `wrapper.get_preferred_size()`. GTK already aggregates
the canvas's size_request through ScrolledWindow + the editor VBox +
the wrapper's border into a natural size that accounts for every
contribution, including the toolbar's width. Drop the now-unused
`canvas_size()` shim from PerKeyEditor.
2026-05-12 12:51:36 -04:00
..
about Add Ukrainian credit to the about model 2026-02-28 09:50:44 -05:00
perkey PerKey dialog: size window from measured natural size 2026-05-12 12:51:36 -04:00
__init__.py ui: better handling of missing devices 2026-03-13 13:41:59 -04:00
action.py device: Support per-slot unpair on Lightspeed receivers (CLI + GUI) (#3183) 2026-04-17 09:34:58 -04:00
common.py Introduce error types 2025-01-02 08:29:32 -05:00
config_panel.py Add per-key RGB color painter and replace MAP_CHOICE color validator 2026-05-10 17:52:55 -04:00
desktop_notifications.py tests: fix ui desktop notifications test 2025-01-02 15:04:41 -05:00
diversion_rules.py Add per-key RGB color painter and replace MAP_CHOICE color validator 2026-05-10 17:52:55 -04:00
icons.py Add support for battery-0N0 icon naming scheme 2026-04-20 21:52:00 -04:00
pair_window.py solaar/ui: Remove outdated logger enabled checks 2025-01-02 09:26:31 -05:00
rule_actions.py rules: fix debug messages for MouseClick rule 2025-11-02 21:01:33 +09:00
rule_base.py Enforce rules on RuleComponentUI subclasses 2025-01-01 10:46:04 -05:00
rule_conditions.py fix: center labels and remove buggy entry resizing logic 2025-09-30 10:42:25 -04:00
tray.py solaar/ui: Remove outdated logger enabled checks 2025-01-02 09:26:31 -05:00
window.py centurion: support PRO X 2 LIGHTSPEED headphones Centurion features (#3150) 2026-04-14 11:43:23 -04:00