Skip to content

Commit

Permalink
指摘事項修正(全画面表示UI文言変更、最大化処理関数名称変更、セパレーター追加)(VOICEVOX#2251
Browse files Browse the repository at this point in the history
  • Loading branch information
terapotan committed Dec 2, 2024
1 parent 720674e commit be26bf9
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/backend/browser/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down
2 changes: 1 addition & 1 deletion src/backend/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ registerIpcMainHandle<IpcMainHandle>({
MINIMIZE_WINDOW: () => {
win.minimize();
},
MAXIMIZE_WINDOW: () => {
TOGGLE_MAXIMIZE_WINDOW: () => {
// 全画面表示中は、全画面表示解除のみを行い、最大化解除処理は実施しない
if (win.isFullScreen()) {
win.setFullScreen(false);
Expand Down
4 changes: 2 additions & 2 deletions src/backend/electron/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ const api: Sandbox = {
void ipcRendererInvokeProxy.MINIMIZE_WINDOW();
},

maximizeWindow: () => {
void ipcRendererInvokeProxy.MAXIMIZE_WINDOW();
toggleMaximizeWindow: () => {
void ipcRendererInvokeProxy.TOGGLE_MAXIMIZE_WINDOW();
},

toggleFullScreen: () => {
Expand Down
5 changes: 3 additions & 2 deletions src/components/Menu/MenuBar/MenuBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,10 @@ const menudata = computed<MenuItemData[]>(() => [
disableWhenUiLocked: false,
subMenu: [
...props.viewSubMenuData,
{ type: "separator" },
{
type: "button",
label: "全画面表示の切り替え",
label: "全画面表示を切り替え",
onClick: toggleFullScreen,
disableWhenUiLocked: false,
},
Expand Down Expand Up @@ -545,7 +546,7 @@ function registerHotkeyForAllEditors(action: Omit<HotkeyAction, "editor">) {
registerHotkeyForAllEditors({
callback: toggleFullScreen,
name: "全画面表示の切り替え",
name: "全画面表示を切り替え",
});
registerHotkeyForAllEditors({
callback: createNewProject,
Expand Down
8 changes: 4 additions & 4 deletions src/components/Menu/MenuBar/MinMaxCloseButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
color="green"
class="title-bar-buttons"
aria-label="最大化"
@click="maximizeWindow()"
@click="toggleMaximizeWindow()"
></QBtn>
</QBadge>
<QBadge
Expand All @@ -63,7 +63,7 @@
:icon="mdiWindowRestore"
class="title-bar-buttons"
aria-label="最大化"
@click="maximizeWindow()"
@click="toggleMaximizeWindow()"
>
</QBtn>

Expand All @@ -74,7 +74,7 @@
icon="crop_square"
class="title-bar-buttons"
aria-label="最大化"
@click="maximizeWindow()"
@click="toggleMaximizeWindow()"
></QBtn>

<QBtn
Expand All @@ -101,7 +101,7 @@ const closeWindow = async () => {
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);
Expand Down
2 changes: 1 addition & 1 deletion src/type/ipc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export type IpcIHData = {
return: void;
};

MAXIMIZE_WINDOW: {
TOGGLE_MAXIMIZE_WINDOW: {
args: [];
return: void;
};
Expand Down
6 changes: 3 additions & 3 deletions src/type/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const defaultHotkeySettings: HotkeySettingType[] = [
combination: HotkeyCombination(!isMac ? "Ctrl N" : "Meta N"),
},
{
action: "全画面表示の切り替え",
action: "全画面表示を切り替え",
combination: HotkeyCombination(!isMac ? "F11" : "Ctrl Meta F"),
},
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -439,7 +439,7 @@ export const hotkeyActionNameSchema = z.enum([
"元に戻す",
"やり直す",
"新規プロジェクト",
"全画面表示の切り替え",
"全画面表示を切り替え",
"プロジェクトを名前を付けて保存",
"プロジェクトを上書き保存",
"プロジェクトを読み込む",
Expand Down

0 comments on commit be26bf9

Please sign in to comment.