Add icons and tooltips for the previous commit's feature

This commit is contained in:
Keavon Chambers
2025-02-12 01:54:16 -08:00
parent 20a5f71bda
commit 7bbbf7fa7c
6 changed files with 67 additions and 10 deletions

View File

@@ -191,14 +191,17 @@ impl LayoutHolder for PathTool {
.widget_holder();
let path_overlay_mode_widget = RadioInput::new(vec![
RadioEntryData::new("1")
.label("1")
RadioEntryData::new("all")
.icon("HandleVisibilityAll")
.tooltip("Show all handles regardless of selection")
.on_update(move |_| PathToolMessage::UpdateOptions(PathOptionsUpdate::OverlayModeType(PathOverlayMode::AllHandles)).into()),
RadioEntryData::new("2")
.label("2")
RadioEntryData::new("selected")
.icon("HandleVisibilitySelected")
.tooltip("Show only handles of the segments connected to selected points")
.on_update(move |_| PathToolMessage::UpdateOptions(PathOptionsUpdate::OverlayModeType(PathOverlayMode::SelectedPointHandles)).into()),
RadioEntryData::new("3")
.label("3")
RadioEntryData::new("frontier")
.icon("HandleVisibilityFrontier")
.tooltip("Show only handles at the frontiers of the segments connected to selected points")
.on_update(move |_| PathToolMessage::UpdateOptions(PathOptionsUpdate::OverlayModeType(PathOverlayMode::FrontierHandles)).into()),
])
.selected_index(Some(self.options.path_overlay_mode as u32))

View File

@@ -144,11 +144,13 @@ impl LayoutHolder for PenTool {
widgets.push(
RadioInput::new(vec![
RadioEntryData::new("1")
.label("1")
RadioEntryData::new("all")
.icon("HandleVisibilityAll")
.tooltip("Show all handles regardless of selection")
.on_update(move |_| PenToolMessage::UpdateOptions(PenOptionsUpdate::OverlayModeType(PenOverlayMode::AllHandles)).into()),
RadioEntryData::new("2")
.label("2")
RadioEntryData::new("frontier")
.icon("HandleVisibilityFrontier")
.tooltip("Show only handles at the frontiers of the segments connected to selected points")
.on_update(move |_| PenToolMessage::UpdateOptions(PenOptionsUpdate::OverlayModeType(PenOverlayMode::FrontierHandles)).into()),
])
.selected_index(Some(self.options.pen_overlay_mode as u32))