forked from 1b-agent/opencadstudio-upstream
feat(options): interface scale for the whole window
On a non-Retina screen macOS draws the interface at 1x, which reads small on a Full HD monitor, and there was no way to enlarge it. Options > Display now offers an interface scale of 75–200 % in 25 % steps, applied through the window's scale factor on top of the display's own and kept with the user settings. It is a list rather than a slider because the dialog rescales under the pointer as the value changes. Fixes #1655 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ff5bfc8c47
commit
340104bf1b
29 files changed
+65
No files matched your search
@@ -663,6 +663,7 @@ impl OpenCADStudio {
|
||||
polar_increment_deg: self.polar_increment_deg,
|
||||
zoom_wheel_reversed: self.zoom_wheel_reversed,
|
||||
touchpad_pan: self.touchpad_pan,
|
||||
ui_scale_percent: self.ui_scale_percent,
|
||||
zoom_factor: self.zoom_factor,
|
||||
cursor_size: self.cursor_size,
|
||||
pick_box: self.pick_box,
|
||||
@@ -764,6 +765,7 @@ impl OpenCADStudio {
|
||||
self.polar_increment_deg = s.polar_increment_deg;
|
||||
self.zoom_wheel_reversed = s.zoom_wheel_reversed;
|
||||
self.touchpad_pan = s.touchpad_pan;
|
||||
self.ui_scale_percent = crate::app::settings::clamp_ui_scale(s.ui_scale_percent);
|
||||
self.zoom_factor = crate::app::settings::clamp_zoom_factor(s.zoom_factor);
|
||||
// Like the drafting-rotation field below, the Options field edits a
|
||||
// buffer rather than the value, so it is reseeded whenever the value
|
||||
|
||||
@@ -8391,6 +8391,12 @@ impl OpenCADStudio {
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::UiScaleChanged(percent) => {
|
||||
self.ui_scale_percent = crate::app::settings::clamp_ui_scale(percent);
|
||||
self.persist_settings_if_changed();
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::ZoomFactorChanged(factor) => {
|
||||
self.zoom_factor = crate::app::settings::clamp_zoom_factor(factor);
|
||||
// The field beside the slider reads the same value, so the
|
||||
|
||||
Reference in new issue
Block a user