refactor(viewcube): shrink cube 30%, compact controls, centre UCS picker
Reduce the ViewCube 30% (VIEWCUBE_PX 120→84) and tighten the nav region (NAV_INSET_F 2.2→2.0) so the home / roll / nudge controls hug the cube in the corner instead of floating in a large dead area, with sizes scaled to keep them from overlapping. Bump the home and roll buttons back up slightly, shift the UCS picker down below the region, and give it a fixed width so it centres exactly under the cube centre. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
edcf24e324
commit
8bdf5228d2
3 changed files with 25 additions and 18 deletions
|
|
@ -23,7 +23,7 @@ use overlay::{
|
|||
layout_context_menu_overlay, mtext_editor_overlay, position_canvas_overlay, qselect_overlay,
|
||||
text_inline_overlay, viewport_context_menu_overlay,
|
||||
};
|
||||
use viewcube::{viewcube_nav_controls, viewcube_ucs_picker};
|
||||
use viewcube::{viewcube_nav_controls, viewcube_ucs_picker, UCS_PICKER_W};
|
||||
|
||||
// Re-export the text-input element ids so sibling modules can address them at
|
||||
// the `view::` path as before the split.
|
||||
|
|
@ -587,10 +587,10 @@ impl OpenCADStudio {
|
|||
.filter(|n| !n.is_empty())
|
||||
.collect();
|
||||
let picker = column![
|
||||
Space::new().height(iced::Length::Fixed(cube_y + VIEWCUBE_HIT_SIZE - 8.0)),
|
||||
Space::new().height(iced::Length::Fixed(cube_y + VIEWCUBE_HIT_SIZE + 6.0)),
|
||||
row![
|
||||
Space::new()
|
||||
.width(iced::Length::Fixed(cube_x + VIEWCUBE_HIT_SIZE * 0.5 - 42.0)),
|
||||
.width(iced::Length::Fixed(cube_x + VIEWCUBE_HIT_SIZE * 0.5 - UCS_PICKER_W * 0.5)),
|
||||
iced::widget::opaque(viewcube_ucs_picker(ucs_current, ucs_names)),
|
||||
],
|
||||
]
|
||||
|
|
@ -636,9 +636,9 @@ impl OpenCADStudio {
|
|||
.filter(|n| !n.is_empty())
|
||||
.collect();
|
||||
let picker = column![
|
||||
Space::new().height(iced::Length::Fixed(cube_y + VIEWCUBE_HIT_SIZE - 8.0)),
|
||||
Space::new().height(iced::Length::Fixed(cube_y + VIEWCUBE_HIT_SIZE + 6.0)),
|
||||
row![
|
||||
Space::new().width(iced::Length::Fixed(cube_x + VIEWCUBE_HIT_SIZE * 0.5 - 42.0)),
|
||||
Space::new().width(iced::Length::Fixed(cube_x + VIEWCUBE_HIT_SIZE * 0.5 - UCS_PICKER_W * 0.5)),
|
||||
iced::widget::opaque(viewcube_ucs_picker(ucs_current, ucs_names)),
|
||||
],
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue