Skip to content

Commit 583d104

Browse files
ajweeksTrueDoctor
authored andcommitted
Bring layer menu items out to sub-menu
1 parent 2087ff9 commit 583d104

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

client/web/src/components/widgets/inputs/MenuBarInput.vue

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,17 @@ const menuEntries: MenuListEntries = [
126126
[
127127
{ label: "Select All", shortcut: ["Ctrl", "A"], action: async () => (await wasm).select_all_layers() },
128128
{ label: "Deselect All", shortcut: ["Ctrl", "Alt", "A"], action: async () => (await wasm).deselect_all_layers() },
129-
{ label: "Raise To Front", shortcut: ["Ctrl", "]"], action: async () => (await wasm).reorder_selected_layer(2147483647) },
130-
{ label: "Raise", shortcut: ["Ctrl", "["], action: async () => (await wasm).reorder_selected_layer(1) },
131-
{ label: "Lower", shortcut: ["Ctrl", "Shift", "]"], action: async () => (await wasm).reorder_selected_layer(-1) },
132-
{ label: "Lower to Back", shortcut: ["Ctrl", "Shift", "["], action: async () => (await wasm).reorder_selected_layer(-2147483648) },
129+
{
130+
label: "Order",
131+
children: [
132+
[
133+
{ label: "Raise To Front", shortcut: ["Ctrl", "Shift", "]"], action: async () => (await wasm).reorder_selected_layer(2147483647) },
134+
{ label: "Raise", shortcut: ["Ctrl", "]"], action: async () => (await wasm).reorder_selected_layer(1) },
135+
{ label: "Lower", shortcut: ["Ctrl", "["], action: async () => (await wasm).reorder_selected_layer(-1) },
136+
{ label: "Lower to Back", shortcut: ["Ctrl", "Shift", "["], action: async () => (await wasm).reorder_selected_layer(-2147483648) },
137+
],
138+
],
139+
},
133140
],
134141
],
135142
},

core/editor/src/input/input_mapper.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,10 @@ impl Default for Mapping {
235235
entry! {action=DocumentMessage::NudgeSelectedLayers(NUDGE_AMOUNT, -NUDGE_AMOUNT), key_down=KeyArrowRight, modifiers=[KeyArrowUp]},
236236
entry! {action=DocumentMessage::NudgeSelectedLayers(NUDGE_AMOUNT, NUDGE_AMOUNT), key_down=KeyArrowRight, modifiers=[KeyArrowDown]},
237237
entry! {action=DocumentMessage::NudgeSelectedLayers(NUDGE_AMOUNT, 0.), key_down=KeyArrowRight},
238-
entry! {action=DocumentMessage::ReorderSelectedLayer(-1), key_down=KeyLeftBracket, modifiers=[KeyControl]},
238+
entry! {action=DocumentMessage::ReorderSelectedLayer(i32::MAX), key_down=KeyRightCurlyBracket, modifiers=[KeyControl]},
239239
entry! {action=DocumentMessage::ReorderSelectedLayer(1), key_down=KeyRightBracket, modifiers=[KeyControl]},
240+
entry! {action=DocumentMessage::ReorderSelectedLayer(-1), key_down=KeyLeftBracket, modifiers=[KeyControl]},
240241
entry! {action=DocumentMessage::ReorderSelectedLayer(i32::MIN), key_down=KeyLeftCurlyBracket, modifiers=[KeyControl]},
241-
entry! {action=DocumentMessage::ReorderSelectedLayer(i32::MAX), key_down=KeyRightCurlyBracket, modifiers=[KeyControl]},
242242
// Global Actions
243243
entry! {action=GlobalMessage::LogInfo, key_down=Key1},
244244
entry! {action=GlobalMessage::LogDebug, key_down=Key2},

0 commit comments

Comments
 (0)