launcher: a checkmark on the Settings boxes, and the Series S profile beside Series X #3157

Closed
leonida/mandy
fiestorra wants to merge 0 commits from launcher-checkmark into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

fiestorra commented 2026-12-02 14:49:08 +00:00

Two Settings-page reports, #3133 and #3108, in one change to tools/leonida_launcher.py.

The checkboxes show a checkmark, not clam's X (#3133)

The launcher forces ttk's clam theme, and clam draws a ticked checkbox as an X. The issue's suggested one-liner does not work as written: s.element_create("Checkbutton.indicator", "from", "default") answers

Duplicate element Checkbutton.indicator

because clam already defines that element - Tcl does not let a theme's own element be replaced in place. What works is the element under a name of its own plus the layout that uses it:

s.element_create("Tick.Checkbutton.indicator", "from", "default")
s.layout("Tick.TCheckbutton", [... ("Tick.Checkbutton.indicator", ...) ...])

and the Settings checkboxes take style="Tick.TCheckbutton". The theme stays clam and nothing else on that widget moves - verified with a Tk root: the new layout uses the new indicator and the base TCheckbutton layout still uses clam's own.

What I could not do: look at it. This session has no interactive desktop to capture (CopyFromScreen: The handle is invalid), so the mark itself is Tk's default indicator, which is what the issue reports it to be.

Both console profiles are offered (#3108)

series_s was already in DEFAULTS, in normalise and in switch_args (-SeriesS), with the command line covered by tests; the Settings page simply did not show the box. It does now, next to Series X, and the two untick each other with the same write-trace pattern the shader switches already use:

self.vars["series_x"].trace_add("write", lambda *_: self.vars["series_x"].get() and self.vars["series_s"].set(False))
self.vars["series_s"].trace_add("write", lambda *_: self.vars["series_s"].get() and self.vars["series_x"].set(False))

Neither ticked leaves the script's own default in charge, and a hand-edited launcher.json carrying both is reduced to Series S by normalise, as before.

Verified:

series_s=True  -> ['-SeriesS']
series_x=True  -> ['-SeriesX']
neither        -> []            (the script's default)
python -I tests/test_leonida_launcher.py     exit 0, 28 tests

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

**Two Settings-page reports, #3133 and #3108, in one change to `tools/leonida_launcher.py`.** ## The checkboxes show a checkmark, not clam's X (#3133) The launcher forces ttk's `clam` theme, and clam draws a ticked checkbox as an X. **The issue's suggested one-liner does not work as written**: `s.element_create("Checkbutton.indicator", "from", "default")` answers ``` Duplicate element Checkbutton.indicator ``` because clam already defines that element - Tcl does not let a theme's own element be replaced in place. **What works is the element under a name of its own plus the layout that uses it:** ```python s.element_create("Tick.Checkbutton.indicator", "from", "default") s.layout("Tick.TCheckbutton", [... ("Tick.Checkbutton.indicator", ...) ...]) ``` and the Settings checkboxes take `style="Tick.TCheckbutton"`. **The theme stays clam and nothing else on that widget moves** - verified with a Tk root: the new layout uses the new indicator and the base `TCheckbutton` layout still uses clam's own. **What I could not do: look at it.** This session has no interactive desktop to capture (`CopyFromScreen: The handle is invalid`), so the mark itself is Tk's `default` indicator, which is what the issue reports it to be. ## Both console profiles are offered (#3108) `series_s` was already in `DEFAULTS`, in `normalise` and in `switch_args` (`-SeriesS`), with the command line covered by tests; **the Settings page simply did not show the box**. It does now, next to Series X, and the two untick each other with the same write-trace pattern the shader switches already use: ```python self.vars["series_x"].trace_add("write", lambda *_: self.vars["series_x"].get() and self.vars["series_s"].set(False)) self.vars["series_s"].trace_add("write", lambda *_: self.vars["series_s"].get() and self.vars["series_x"].set(False)) ``` **Neither ticked leaves the script's own default in charge**, and a hand-edited `launcher.json` carrying both is reduced to Series S by `normalise`, as before. **Verified**: ``` series_s=True -> ['-SeriesS'] series_x=True -> ['-SeriesX'] neither -> [] (the script's default) python -I tests/test_leonida_launcher.py exit 0, 28 tests ``` **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
Raesdf commented 2026-12-02 14:53:09 +00:00

Hi @fiestorra — both of these are already claimed and in progress:

  • #3108: I claimed it in #2570 (claiming: #3108) and my PR #3130 (opened first, already reviewed) adds the Series S profile as a radio group — the radio was chosen over a second checkbox deliberately, so X and S can't both be on and one is always active.
  • #3133: I also claimed it in #2570 (claiming: #3133) and have the fix ready on branch launcher-checkmark — it becomes a PR once #3130 merges (the repo allows 1 open PR at a time for contributors without write access).

One technical note: borrowing the "default" theme indicator (Tick.Checkbutton.indicator from "default") renders invisible on Windows — I verified this on my machine (the checkbox disappears entirely). My fix draws the checkmark with images created in code instead, and I verified it visually in the Launcher.

Could we avoid duplicating the work here?

Hi @fiestorra — both of these are already claimed and in progress: - #3108: I claimed it in #2570 (claiming: #3108) and my PR #3130 (opened first, already reviewed) adds the Series S profile as a radio group — the radio was chosen over a second checkbox deliberately, so X and S can't both be on and one is always active. - #3133: I also claimed it in #2570 (claiming: #3133) and have the fix ready on branch launcher-checkmark — it becomes a PR once #3130 merges (the repo allows 1 open PR at a time for contributors without write access). One technical note: borrowing the "default" theme indicator (Tick.Checkbutton.indicator from "default") renders invisible on Windows — I verified this on my machine (the checkbox disappears entirely). My fix draws the checkmark with images created in code instead, and I verified it visually in the Launcher. Could we avoid duplicating the work here?
merzleckeier reviewed 2026-12-02 15:01:39 +00:00
merzleckeier left a comment
No description provided.
**The Settings grid puts two controls in each cell of row 5.** I ran `e0fdd6b3` merged onto `main` `43fc605e` and read `grid_info()` from the actual Tk 8.6.16 widgets. In column 0, `Precompile every pipeline` shares a cell with the `Resolution` label. In column 1, `Check for updates at start` shares a cell with the resolution combobox. The checkbox grid now uses six rows. I tested a local variant that starts the resolution controls at `(len(checks) + 1) // 2` and puts the help below. Both collisions disappeared. All 27 launcher tests passed, and the same Tk test confirmed that selecting X or S clears the other choice. Clearing both preserves an implicit profile in the generated command. The GUI ran on Linux with both platform branches exercised. Windows indicator rendering was outside the test. #3130 already implements the profile setting as a single radio group. Both PRs merge individually onto current `main`, and merging their heads together reports a conflict in `tools/leonida_launcher.py`. The two issue claims also predate this PR, as noted in the existing coordination comment. [Earlier claims](https://github.com/ProjectLeonida/mandy/pull/3157#issuecomment-7349304593) AI-assisted with OpenAI Codex.
fiestorra commented 2026-12-02 15:17:22 +00:00

Closing: both issues are yours, and your technical note is the better information. I checked the open pull requests before starting and did not check the claiming: lines in #2570 - that is the half of the rule I skipped, and it is how this happened. #3130 was open and reviewed, and the two claiming: comments were there to be read.

On the indicator: you verified it visually and I could not - this session has no interactive desktop (CopyFromScreen: The handle is invalid), which is why my note said "the mark is Tk's default indicator" rather than "it draws". If it renders invisible under clam on Windows, my approach is wrong and yours is right, and it is worth saying in the issue so nobody repeats it: a borrowed indicator keeps the default theme's colours, and clam's dark background hides them.

What may still be useful to you - the thing I did measure, from a Tk root with no desktop:

  • the issue's one-liner cannot work as written: s.element_create("Checkbutton.indicator", "from", "default") answers Duplicate element Checkbutton.indicator, because clam already defines that element. A theme's own element cannot be replaced in place.
  • the element under a new name does register (Tick.Checkbutton.indicator), and a layout can be given that uses it while TCheckbutton keeps clam's own - so the machinery works, it is the colours that fail, which fits what you saw.

Your radio group for #3108 is the better design too: two checkboxes that untick each other leave a state where neither is ticked, and "one is always active" is what the launcher means.

Nothing of mine is needed for either issue; launcher-checkmark is free as a branch name and this pull request is closed.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

**Closing: both issues are yours, and your technical note is the better information.** **I checked the open pull requests before starting and did not check the `claiming:` lines in #2570 - that is the half of the rule I skipped, and it is how this happened.** **#3130 was open and reviewed, and the two `claiming:` comments were there to be read.** **On the indicator**: you verified it visually and I could not - **this session has no interactive desktop** (`CopyFromScreen: The handle is invalid`), which is why my note said "the mark is Tk's `default` indicator" rather than "it draws". **If it renders invisible under clam on Windows, my approach is wrong and yours is right**, and it is worth saying in the issue so nobody repeats it: **a borrowed indicator keeps the `default` theme's colours, and clam's dark background hides them.** **What may still be useful to you** - the thing I did measure, from a Tk root with no desktop: - **the issue's one-liner cannot work as written**: `s.element_create("Checkbutton.indicator", "from", "default")` answers **`Duplicate element Checkbutton.indicator`**, because clam already defines that element. A theme's own element cannot be replaced in place. - **the element under a new name does register** (`Tick.Checkbutton.indicator`), **and a layout can be given that uses it** while `TCheckbutton` keeps clam's own - so the machinery works, **it is the colours that fail**, which fits what you saw. **Your radio group for #3108 is the better design too**: two checkboxes that untick each other leave a state where neither is ticked, and "one is always active" is what the launcher means. **Nothing of mine is needed for either issue**; `launcher-checkmark` is free as a branch name and this pull request is closed. **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.
Sign in to join this conversation.
No description provided.