Repository navigation
Dialogs: the button row is as wide as the fields, not the window - #239
Merged
Merged
Conversation
The OK/Cancel row was laid out right to left at the full available width, and a dialog without a maximum width may use the whole window: the row, and the window with it, spanned the window (Clean Up, Blend Options, every generic parameter dialog). The row now spans the fields above it, at least the dialog's minimum width, so a dialog is sized to its content. Fixes storytold#238. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Thanks, merged! Dialogs sized to their fields is how the reference app's form dialogs behave. The before/after numbers (Clean Up at 1586 pt in a 1600-pt window) and the narrow-window check in the test made this easy to review. I ran the full |
This was referenced Oct 7, 2026
RockCollect0r
pushed a commit
to RockCollect0r/vectorcraft
that referenced
this pull request
Oct 7, 2026
On the in-window menu bar (Windows and Linux) each top-level menu needed its own click: with File open, moving the pointer onto Edit or Object did nothing. Now, as on a native menu bar, while one menu is open a moving pointer that reaches another title opens that menu instead (ported from PhotoCraft). A pointer resting on a title doesn't switch, and a tall menu that covers the bar doesn't switch to the title underneath it. The native macOS menu bar is unchanged. Also adds a regression test for storytold#292: the Simplify, Offset Path, Move, Rotate, Split Into Grid and Average dialogs are 366 pt wide in a 1600 pt window (already fixed by storytold#239). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #238.
Problem:
showincrates/ui-egui/src/dialogs/mod.rslays out the OK/Cancel row right to left atui.available_width(). For a dialog without amax_width, that is the whole window, so the row, and the window with it, spans the window. This affects Clean Up, Blend Options, every generic parameter dialog (ui.paramDialog) and the other form dialogs without a maximum width. Clean Up was 1586 points wide in a 1600-point window.Change: the row is as wide as what the dialog has laid out above it (
ui.min_rect().width()), which includesset_min_width. A dialog is now sized to its fields, and wide dialogs keep their size:min_width, such as Export for Screens, PDF Presets and Print Presets, are at least that wide;The comment above the row, which already explained the same issue for its height, now covers its width too.
Tests
dialogs::tests::a_form_dialog_is_as_wide_as_its_fields_not_the_window: the Clean Up parameter dialog in a 1600-point window is narrower than 500 points, and in a 360-point window it still fits.mainit fails ("Clean Up is 1586 wide in a 1600-point window") and passes with this change.cargo test -p vectorcraft-ui-egui: 526 passed.cargo clippy -p vectorcraft-ui-egui --all-targets -- -D warnings(Rust 1.99): clean.cargo fmt --all -- --check: clean.I didn't run the full
cargo xtask ci(wasm step) here.🤖 Generated with Claude Code