Repository navigation
Ribbon: Font Size is a box you type into, the sizes behind its arrow - #952
Conversation
|
Thanks @marcoarnulfo, great turnaround! Tested this branch (5a7fbfa) on Windows 11 at 150% scaling with real key presses and mouse clicks; size read back with
The arrow's list is plain (no filter field) with the current size highlighted. All as expected. On your question: a follow-up PR for the font name box sounds good, to keep this one small. Since this PR closes #932, could you mention the follow-up there or link it to #933 (the font list issue), so the font-name Enter bug from my #932 comment isn't lost? One small thing: the PR title is "Contributors: add my real name", from the second commit ( |
The size box is one frame with the Font name box's fill, border, height and corners, with the text field and the dropdown arrow inside it (focus shows the selection stroke). The size list drops directly below the box and is as wide as it, instead of opening 220 pt wide under the arrow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ut3hr3a13szpQdQ7gbYbfc
|
Thanks @marcoarnulfo, and thanks for taking the font name box in a follow-up! One more small thing after trying it by hand: the new size box didn't quite match the Font name box beside it (different background, shorter height, arrow outside the box, and the list opened offset under the arrow rather than directly below the box). I've put a small follow-up into your branch as marcoarnulfo#1 (only |
|
Thank you, @richard1912, that's a nice touch. I merged your marcoarnulfo#1 into this branch as is (merge commit, so your commits keep your name); the size box now matches the font name box and the list drops right under it. Tests, clippy and fmt pass here too. |
Fixes #932.
Thanks @richard1912 for the precise report and the key-by-key table. The size control borrowed the font-name dropdown: on Enter it applied the highlighted row of a substring-filtered list, so typing
6landed on 36. Font Size is now a text box like Excel's: click it or press Alt, H, F, S and the size is selected, typing replaces it, Enter applies exactly the number typed, and Esc or clicking away reverts. Values outside 1 to 409 still go throughhome.fontSize, which already refuses them with "The number must be between 1 and 409." and rounds to 0.5; text that isn't a number just reverts. The arrow next to the box opens the plain list of standard sizes (no filter field), with the current size highlighted, arrows and Enter to pick. The list reuses the existing combo popup with the filter switched off, so the font, number format and sheet navigator combos are unchanged.The font name box has the same Enter issue (the comment on #932); I left
editable_comboitself alone here to keep the diff small. Happy to fix it in this PR or a follow-up, whichever you prefer.Validation:
cargo test -p gridcraft-ui-egui --test font_size_box: on main, typing6+ Enter gives 36 and there is no separate arrow; passes here (6, 2 and 10.5 applied to the whole selection, 500 refused with the message,abcand Esc revert, list click and Down + Enter pick)cargo test -p gridcraft-ui-egui --test keytips(the custom-size check now reads the box value)cargo clippy -p gridcraft-ui-egui --all-targets -- -D warnings,cargo fmt --all -- --checkA separate commit adds my own entry to
contributors/people.toml(real name only), as AGENTS.md suggests.