Remove obsolete canvas panel focus mode

This commit is contained in:
2026-09-12 15:06:57 -07:00
parent 8112dea7a3
commit 40154983cc
12 changed files with 44 additions and 104 deletions
@@ -130,7 +130,6 @@ pub enum CanvasEvent {
FormShown(Context, Id),
Zoom(Context, Option<f32>),
Camera(Context, u64, super::canvas_workspace::Event),
Focus(Context),
Shelf(Context, Shelf),
OpenUse(Context, Id),
Back(Context),
@@ -170,7 +169,6 @@ impl CanvasEvent {
| Self::FormShown(context, _)
| Self::Zoom(context, _)
| Self::Camera(context, ..)
| Self::Focus(context)
| Self::Shelf(context, _)
| Self::OpenUse(context, _)
| Self::Back(context)
@@ -320,7 +318,6 @@ impl State {
pub(crate) fn camera_boundary(&self) -> impl PartialEq + use<> {
(
self.canvas_tool,
self.presentation.focused,
self.presentation.shelf,
self.presentation.viewport,
self.presentation.pan,
@@ -359,7 +356,6 @@ impl State {
if self.presentation.identity != Some((document, owner)) {
self.presentation = workspace::Presentation {
identity: Some((document, owner)),
focused: self.presentation.focused,
..Default::default()
};
self.details_offset = iced::Vector::ZERO;
@@ -394,12 +390,6 @@ impl State {
true
}
}
pub(crate) fn focused(&self) -> bool {
self.presentation.focused
}
pub(crate) fn toggle_focus(&mut self) {
self.presentation.focused = !self.presentation.focused;
}
pub(crate) fn toggle_shelf(&mut self, shelf: Shelf) {
self.presentation.shelf = (self.presentation.shelf != Some(shelf)).then_some(shelf);
}