[studio] Fix Navigation shortcuts for non-Mac systems
All checks were successful
Build / build (push) Successful in 1m18s

This commit is contained in:
2025-06-21 08:13:14 -05:00
parent 5f2397903a
commit 14d58f3f5b

View File

@ -312,11 +312,13 @@ void StudioUI::drawMenu() noexcept {
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Navigate")) {
if (ImGui::MenuItem("Back", STUDIO_CTRL "+{", false, m_sctx.navIdx > 1)) {
constexpr auto backShortcut = ox::defines::OS == ox::OS::Darwin ? "Cmd+[" : "Alt+Left Arrow";
constexpr auto fwdShortcut = ox::defines::OS == ox::OS::Darwin ? "Cmd+]" : "Alt+Right Arrow";
if (ImGui::MenuItem("Back", backShortcut, false, m_sctx.navIdx > 1)) {
navigateBack(m_sctx);
}
if (ImGui::MenuItem(
"Forward", STUDIO_CTRL "+}", false,
"Forward", fwdShortcut, false,
m_sctx.navIdx < m_sctx.navStack.size())) {
navigateForward(m_sctx);
}