Give the Options dialog a tab rail that can hold more pages

The dialog laid its pages out as a row of buttons across the top, which is
what AutoCAD does and what fits while there are four of them. The pages this
series adds take it to nine, and the names are translated into 21 languages —
a row of nine German or Russian page names does not fit at any dialog width
worth having.

The rail is now a vertical list down the left, the dialog is 880×620 rather
than 540×560, and the content pane scrolls on its own.

Which page was open is now remembered. With four pages, reopening on General
was a shrug; with nine it means hunting for the one you were last in.

The ribbon's Options tool has existed all along — `ToolDef`, icon and all —
but was marked `#[allow(dead_code)]` and never added to a group, so the
dialog could only be reached by typing OPTIONS or from the start page. It
now sits in Manage ▸ Application, beside About.

No settings change in this commit; it is only the shell the rest needs.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
PanosandClaude Opus 5 committed 2026-09-10 08:18:23 +03:00
1 parent b19992cbcb
commit b1d2ac2744
6 files changed
+49 -18

No files matched your search

+3
View File
@@ -170,6 +170,8 @@ pub struct UserSettings {
/// GRIPOBJLIMIT: past this many selected objects, no grips are drawn at
/// all. 0 means no limit. The drawing header carries no slot for it.
pub grip_object_limit: i32,
/// Which Options page was showing when the dialog was last closed.
pub options_tab: crate::ui::window::options::OptionsTab,
/// CURSORTYPE: crosshair or the platform pointer over the drawing.
pub cursor_type: CursorType,
/// Explicit crosshair RGB. `None` keeps automatic background contrast.
@@ -325,6 +327,7 @@ impl Default for UserSettings {
zoom_factor: 60,
cursor_size: 5,
pick_box: 3,
options_tab: crate::ui::window::options::OptionsTab::General,
double_click_block_refedit: false,
double_click_block_attedit: true,
grip_object_limit: DEFAULT_GRIP_OBJECT_LIMIT,
+2
View File
@@ -365,6 +365,7 @@ impl OpenCADStudio {
zoom_factor: self.zoom_factor,
cursor_size: self.cursor_size,
pick_box: self.pick_box,
options_tab: self.options_tab,
double_click_block_refedit: self.double_click_block_refedit,
double_click_block_attedit: self.double_click_block_attedit,
grip_object_limit: self.grip_object_limit,
@@ -422,6 +423,7 @@ impl OpenCADStudio {
self.zoom_factor = s.zoom_factor.clamp(3, 100);
self.cursor_size = s.cursor_size.clamp(1, 100);
self.pick_box = s.pick_box.clamp(0, 50);
self.options_tab = s.options_tab;
self.double_click_block_refedit = s.double_click_block_refedit;
self.double_click_block_attedit = s.double_click_block_attedit;
self.grip_object_limit = s.grip_object_limit.clamp(0, 32767);
+2 -2
View File
@@ -175,8 +175,8 @@ impl OpenCADStudio {
}
super::super::ModalKind::Options => sized_flow(
ex,
540,
560,
880,
620,
|flow| {
crate::ui::window::options::view_window(
&self.default_save_format,