From be26bf9ec3c630a23ea2c625a999e851e1035695 Mon Sep 17 00:00:00 2001 From: "KTERAPO\\gapck" Date: Mon, 2 Dec 2024 11:37:49 +0900 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E6=91=98=E4=BA=8B=E9=A0=85=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=EF=BC=88=E5=85=A8=E7=94=BB=E9=9D=A2=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?UI=E6=96=87=E8=A8=80=E5=A4=89=E6=9B=B4=E3=80=81=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E5=8C=96=E5=87=A6=E7=90=86=E9=96=A2=E6=95=B0=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=A4=89=E6=9B=B4=E3=80=81=E3=82=BB=E3=83=91=E3=83=AC?= =?UTF-8?q?=E3=83=BC=E3=82=BF=E3=83=BC=E8=BF=BD=E5=8A=A0=EF=BC=89=EF=BC=88?= =?UTF-8?q?#2251=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/browser/sandbox.ts | 4 ++-- src/backend/electron/main.ts | 2 +- src/backend/electron/preload.ts | 4 ++-- src/components/Menu/MenuBar/MenuBar.vue | 5 +++-- src/components/Menu/MenuBar/MinMaxCloseButtons.vue | 8 ++++---- src/type/ipc.ts | 2 +- src/type/preload.ts | 6 +++--- 7 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/backend/browser/sandbox.ts b/src/backend/browser/sandbox.ts index 39316a7d8b..58fe9bd848 100644 --- a/src/backend/browser/sandbox.ts +++ b/src/backend/browser/sandbox.ts @@ -186,8 +186,8 @@ export const api: Sandbox = { minimizeWindow() { throw new Error(`Not supported on Browser version: minimizeWindow`); }, - maximizeWindow() { - throw new Error(`Not supported on Browser version: maximizeWindow`); + toggleMaximizeWindow() { + throw new Error(`Not supported on Browser version: toggleMaximizeWindow`); }, toggleFullScreen() { throw new Error(`Not supported on Browser version: toggleFullScreen`); diff --git a/src/backend/electron/main.ts b/src/backend/electron/main.ts index 7567752bff..5d932a3991 100644 --- a/src/backend/electron/main.ts +++ b/src/backend/electron/main.ts @@ -616,7 +616,7 @@ registerIpcMainHandle({ MINIMIZE_WINDOW: () => { win.minimize(); }, - MAXIMIZE_WINDOW: () => { + TOGGLE_MAXIMIZE_WINDOW: () => { // 全画面表示中は、全画面表示解除のみを行い、最大化解除処理は実施しない if (win.isFullScreen()) { win.setFullScreen(false); diff --git a/src/backend/electron/preload.ts b/src/backend/electron/preload.ts index c7a34bab7a..7b4155aae7 100644 --- a/src/backend/electron/preload.ts +++ b/src/backend/electron/preload.ts @@ -105,8 +105,8 @@ const api: Sandbox = { void ipcRendererInvokeProxy.MINIMIZE_WINDOW(); }, - maximizeWindow: () => { - void ipcRendererInvokeProxy.MAXIMIZE_WINDOW(); + toggleMaximizeWindow: () => { + void ipcRendererInvokeProxy.TOGGLE_MAXIMIZE_WINDOW(); }, toggleFullScreen: () => { diff --git a/src/components/Menu/MenuBar/MenuBar.vue b/src/components/Menu/MenuBar/MenuBar.vue index 6f531e42f7..ee83be7c91 100644 --- a/src/components/Menu/MenuBar/MenuBar.vue +++ b/src/components/Menu/MenuBar/MenuBar.vue @@ -406,9 +406,10 @@ const menudata = computed(() => [ disableWhenUiLocked: false, subMenu: [ ...props.viewSubMenuData, + { type: "separator" }, { type: "button", - label: "全画面表示の切り替え", + label: "全画面表示を切り替え", onClick: toggleFullScreen, disableWhenUiLocked: false, }, @@ -545,7 +546,7 @@ function registerHotkeyForAllEditors(action: Omit) { registerHotkeyForAllEditors({ callback: toggleFullScreen, - name: "全画面表示の切り替え", + name: "全画面表示を切り替え", }); registerHotkeyForAllEditors({ callback: createNewProject, diff --git a/src/components/Menu/MenuBar/MinMaxCloseButtons.vue b/src/components/Menu/MenuBar/MinMaxCloseButtons.vue index cafbe52e93..236aaf0fd4 100644 --- a/src/components/Menu/MenuBar/MinMaxCloseButtons.vue +++ b/src/components/Menu/MenuBar/MinMaxCloseButtons.vue @@ -37,7 +37,7 @@ color="green" class="title-bar-buttons" aria-label="最大化" - @click="maximizeWindow()" + @click="toggleMaximizeWindow()" > @@ -74,7 +74,7 @@ icon="crop_square" class="title-bar-buttons" aria-label="最大化" - @click="maximizeWindow()" + @click="toggleMaximizeWindow()" > { void store.actions.CHECK_EDITED_AND_NOT_SAVE({ closeOrReload: "close" }); }; const minimizeWindow = () => window.backend.minimizeWindow(); -const maximizeWindow = () => window.backend.maximizeWindow(); +const toggleMaximizeWindow = () => window.backend.toggleMaximizeWindow(); const isMaximized = computed(() => store.state.isMaximized); const isFullscreen = computed(() => store.getters.IS_FULLSCREEN); diff --git a/src/type/ipc.ts b/src/type/ipc.ts index 7681f3f8b1..eb1158c64d 100644 --- a/src/type/ipc.ts +++ b/src/type/ipc.ts @@ -118,7 +118,7 @@ export type IpcIHData = { return: void; }; - MAXIMIZE_WINDOW: { + TOGGLE_MAXIMIZE_WINDOW: { args: []; return: void; }; diff --git a/src/type/preload.ts b/src/type/preload.ts index 2e6e1f33e7..d05dded4a0 100644 --- a/src/type/preload.ts +++ b/src/type/preload.ts @@ -121,7 +121,7 @@ export const defaultHotkeySettings: HotkeySettingType[] = [ combination: HotkeyCombination(!isMac ? "Ctrl N" : "Meta N"), }, { - action: "全画面表示の切り替え", + action: "全画面表示を切り替え", combination: HotkeyCombination(!isMac ? "F11" : "Ctrl Meta F"), }, { @@ -241,7 +241,7 @@ export interface Sandbox { }): void; closeWindow(): void; minimizeWindow(): void; - maximizeWindow(): void; + toggleMaximizeWindow(): void; toggleFullScreen(): void; logError(...params: unknown[]): void; logWarn(...params: unknown[]): void; @@ -439,7 +439,7 @@ export const hotkeyActionNameSchema = z.enum([ "元に戻す", "やり直す", "新規プロジェクト", - "全画面表示の切り替え", + "全画面表示を切り替え", "プロジェクトを名前を付けて保存", "プロジェクトを上書き保存", "プロジェクトを読み込む",