diff --git a/editor/src/messages/tool/tool_messages/path_tool.rs b/editor/src/messages/tool/tool_messages/path_tool.rs index a87fccbf..89dfe031 100644 --- a/editor/src/messages/tool/tool_messages/path_tool.rs +++ b/editor/src/messages/tool/tool_messages/path_tool.rs @@ -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)) diff --git a/editor/src/messages/tool/tool_messages/pen_tool.rs b/editor/src/messages/tool/tool_messages/pen_tool.rs index d59af4ff..ef368447 100644 --- a/editor/src/messages/tool/tool_messages/pen_tool.rs +++ b/editor/src/messages/tool/tool_messages/pen_tool.rs @@ -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)) diff --git a/frontend/assets/icon-16px-solid/handle-visibility-all.svg b/frontend/assets/icon-16px-solid/handle-visibility-all.svg new file mode 100644 index 00000000..d7ef73c3 --- /dev/null +++ b/frontend/assets/icon-16px-solid/handle-visibility-all.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/frontend/assets/icon-16px-solid/handle-visibility-frontier.svg b/frontend/assets/icon-16px-solid/handle-visibility-frontier.svg new file mode 100644 index 00000000..3c7fb0b1 --- /dev/null +++ b/frontend/assets/icon-16px-solid/handle-visibility-frontier.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/frontend/assets/icon-16px-solid/handle-visibility-selected.svg b/frontend/assets/icon-16px-solid/handle-visibility-selected.svg new file mode 100644 index 00000000..7609920b --- /dev/null +++ b/frontend/assets/icon-16px-solid/handle-visibility-selected.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/frontend/src/utility-functions/icons.ts b/frontend/src/utility-functions/icons.ts index 4e79c579..58dacceb 100644 --- a/frontend/src/utility-functions/icons.ts +++ b/frontend/src/utility-functions/icons.ts @@ -133,6 +133,9 @@ import FrameSelected from "@graphite-frontend/assets/icon-16px-solid/frame-selec import GraphViewClosed from "@graphite-frontend/assets/icon-16px-solid/graph-view-closed.svg"; import GraphViewOpen from "@graphite-frontend/assets/icon-16px-solid/graph-view-open.svg"; import GraphiteLogo from "@graphite-frontend/assets/icon-16px-solid/graphite-logo.svg"; +import HandleVisibilityAll from "@graphite-frontend/assets/icon-16px-solid/handle-visibility-all.svg"; +import HandleVisibilityFrontier from "@graphite-frontend/assets/icon-16px-solid/handle-visibility-frontier.svg"; +import HandleVisibilitySelected from "@graphite-frontend/assets/icon-16px-solid/handle-visibility-selected.svg"; import HistoryRedo from "@graphite-frontend/assets/icon-16px-solid/history-redo.svg"; import HistoryUndo from "@graphite-frontend/assets/icon-16px-solid/history-undo.svg"; import IconsGrid from "@graphite-frontend/assets/icon-16px-solid/icons-grid.svg"; @@ -242,6 +245,9 @@ const SOLID_16PX = { GraphiteLogo: { svg: GraphiteLogo, size: 16 }, GraphViewClosed: { svg: GraphViewClosed, size: 16 }, GraphViewOpen: { svg: GraphViewOpen, size: 16 }, + HandleVisibilityAll: { svg: HandleVisibilityAll, size: 16 }, + HandleVisibilityFrontier: { svg: HandleVisibilityFrontier, size: 16 }, + HandleVisibilitySelected: { svg: HandleVisibilitySelected, size: 16 }, HistoryRedo: { svg: HistoryRedo, size: 16 }, HistoryUndo: { svg: HistoryUndo, size: 16 }, IconsGrid: { svg: IconsGrid, size: 16 },