forked from 1b-agent/opencadstudio-upstream
refactor(ui): remove the viewport navigation bar
Sağ kenardaki dikey orbit/pan/zoom/zoom-extents araç çubuğu tümüyle kaldırıldı: viewport render'ı, overlay::nav_toolbar fonksiyonu, show_navbar state + ToggleNavbar mesajı/handler'ı, NAVBAR komutu, View şeridindeki "Navigation Bar" aracı ve navbar modülü/ikonu. Aynı gezinme işlemleri komutlar (3DORBIT, PAN, ZOOM*) ve ViewCube üzerinden erişilebilir durumda. Co-Authored-By: Claude Opus 4.7 <[email protected]>
This commit is contained in:
1 parent
6483566c5d
commit
fda0f2dbb9
8 files changed
+3
-114
No files matched your search
@@ -4756,11 +4756,6 @@ impl OpenCADStudio {
|
||||
return Task::done(Message::ToggleViewCube);
|
||||
}
|
||||
|
||||
// ── NAVBAR — toggle navigation toolbar visibility ────────────────────
|
||||
"NAVBAR" => {
|
||||
return Task::done(Message::ToggleNavbar);
|
||||
}
|
||||
|
||||
// ── PROPERTIES — toggle Properties panel visibility ──────────────────
|
||||
"PROPERTIES" | "PR" | "PROPS" => {
|
||||
return Task::done(Message::ToggleProperties);
|
||||
|
||||
@@ -74,8 +74,6 @@ pub(super) struct OpenCADStudio {
|
||||
show_ucs_icon: bool,
|
||||
/// Whether the ViewCube 3D gizmo is visible in model space (NAVVCUBE).
|
||||
show_viewcube: bool,
|
||||
/// Whether the navigation toolbar is shown in the viewport (NAVBAR).
|
||||
show_navbar: bool,
|
||||
/// Whether the Properties panel is shown on the left (PROPERTIES).
|
||||
show_properties: bool,
|
||||
/// Whether the document file tabs are shown at the top (FILETAB).
|
||||
@@ -408,8 +406,6 @@ pub enum Message {
|
||||
ToggleGridSnap,
|
||||
/// Toggle the ViewCube 3D gizmo visibility (NAVVCUBE).
|
||||
ToggleViewCube,
|
||||
/// Toggle the navigation toolbar visibility (NAVBAR).
|
||||
ToggleNavbar,
|
||||
/// Toggle the Properties panel visibility (PROPERTIES).
|
||||
ToggleProperties,
|
||||
/// Toggle the document file tabs at the top (FILETAB).
|
||||
@@ -746,7 +742,6 @@ impl OpenCADStudio {
|
||||
dyn_input: true,
|
||||
show_ucs_icon: true,
|
||||
show_viewcube: true,
|
||||
show_navbar: true,
|
||||
show_properties: true,
|
||||
show_file_tabs: true,
|
||||
show_layout_tabs: true,
|
||||
|
||||
@@ -2720,10 +2720,6 @@ impl OpenCADStudio {
|
||||
self.show_viewcube ^= true;
|
||||
Task::none()
|
||||
}
|
||||
Message::ToggleNavbar => {
|
||||
self.show_navbar ^= true;
|
||||
Task::none()
|
||||
}
|
||||
Message::ToggleProperties => {
|
||||
self.show_properties ^= true;
|
||||
Task::none()
|
||||
|
||||
@@ -529,24 +529,6 @@ impl OpenCADStudio {
|
||||
.height(Fill)
|
||||
};
|
||||
|
||||
if self.show_navbar && !tab.is_start {
|
||||
// Anchor the nav toolbar to the vertical centre of the
|
||||
// viewport area, flush against the right edge with a small
|
||||
// gutter, so it stays aligned no matter how tall the
|
||||
// window is.
|
||||
let nav = container(overlay::nav_toolbar())
|
||||
.align_right(Fill)
|
||||
.align_y(iced::alignment::Vertical::Center)
|
||||
.height(Fill)
|
||||
.padding(iced::Padding {
|
||||
top: 0.0,
|
||||
right: 8.0,
|
||||
bottom: 0.0,
|
||||
left: 0.0,
|
||||
});
|
||||
viewport_stack = viewport_stack.push(nav);
|
||||
}
|
||||
|
||||
if self.show_viewcube && !is_paper && !tab.is_start {
|
||||
let cube_click: Element<'_, Message> = container(
|
||||
mouse_area(container(
|
||||
|
||||
Reference in new issue
Block a user