feat(polar): angle picker dropdown on the POLAR pill (#264)

The polar-tracking pill only right-click-cycled 15→30→45→90. Add an
AutoCAD-style angle picker opened from a caret on the pill: presets
90/45/30/22.5/18/15/10/5/1 plus a free-text field for any custom angle,
mirroring the existing units / scale status-bar popups. The chosen angle
persists like the other user settings.

Factor the shared chrome into one `split_pill(main, caret_msg, active,
open)` helper (+ `pill_text_color`) so the OSNAP and POLAR pills stop
hand-rolling the same outer border, background, caret and sizing — each
pill now only supplies its own main region. The caret is sized and
aligned to sit inside the single pill border on both.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-09 21:35:47 +03:00
1 parent 39c0a84c3c
commit 363ff614ec
6 files changed
+289 -137

No files matched your search

+13
View File
@@ -1253,6 +1253,7 @@ impl OpenCADStudio {
self.ortho_mode,
self.polar_mode,
self.polar_increment_deg,
self.polar_popup_open,
self.dyn_input,
self.snapper.otrack_enabled,
tab.scene.layout_names(),
@@ -1320,6 +1321,17 @@ impl OpenCADStudio {
iced::widget::Space::new().width(0).height(0).into()
};
let polar_layer: Element<'_, Message> = if self.polar_popup_open {
crate::ui::popup::polar_popup::polar_popup_overlay(
self.polar_increment_deg,
&self.polar_custom_input,
sb_pill(crate::ui::statusbar::SB_POLAR_ID),
win,
)
} else {
iced::widget::Space::new().width(0).height(0).into()
};
let statusbar_menu_layer: Element<'_, Message> = if self.statusbar_menu_open {
crate::ui::statusbar::statusbar_menu::statusbar_menu_overlay(
&self.statusbar_config,
@@ -1412,6 +1424,7 @@ impl OpenCADStudio {
main_ui,
snap_layer,
scale_layer,
polar_layer,
statusbar_menu_layer,
layout_list_layer,
units_layer,