Skip to content

Commit

Permalink
fix: replaced maximiziation with full screen
Browse files Browse the repository at this point in the history
  • Loading branch information
wldhg committed Jul 21, 2022
1 parent bda91c8 commit a0b94ff
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 62 deletions.
2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "viseme-labeler",
"version": "1.2.10",
"version": "1.2.11",
"description": "Viseme labeling tool",
"license": "MIT",
"author": {
Expand Down
4 changes: 2 additions & 2 deletions src/channel/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default (
ipcMain.on('app-unmaximize', () => {
getHermes()
.then(({ mainWindow }) => {
mainWindow.unmaximize();
mainWindow.setFullScreen(false);
return null;
})
.catch(console.error);
Expand All @@ -155,7 +155,7 @@ export default (
ipcMain.on('app-maximize', () => {
getHermes()
.then(({ mainWindow }) => {
mainWindow.maximize();
mainWindow.setFullScreen(true);
return null;
})
.catch(console.error);
Expand Down
60 changes: 33 additions & 27 deletions src/renderer/AppToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,33 +250,39 @@ const AppToolbar = (props: AppToolbarProps) => {
</Tooltip>
)
)}
<IconButton
onClick={() => {
ctx.toggleTheme();
}}
>
{ctx.isLightTheme ? <DarkMode /> : <LightMode />}
</IconButton>
<IconButton
onClick={() => {
if (isMaximized) {
window.electron.ipcRenderer.sendMessage('app-unmaximize', []);
setIsMaximized(false);
} else {
window.electron.ipcRenderer.sendMessage('app-maximize', []);
setIsMaximized(true);
}
}}
>
{isMaximized ? <FullscreenExit /> : <Fullscreen />}
</IconButton>
<IconButton
onClick={() => {
window.electron.ipcRenderer.sendMessage('app-close', []);
}}
>
<Clear />
</IconButton>
<Tooltip title={ctx.isLightTheme ? 'Dark Mode' : 'Light Mode'}>
<IconButton
onClick={() => {
ctx.toggleTheme();
}}
>
{ctx.isLightTheme ? <DarkMode /> : <LightMode />}
</IconButton>
</Tooltip>
<Tooltip title={isMaximized ? 'Window Mode' : 'Full Screen'}>
<IconButton
onClick={() => {
if (isMaximized) {
window.electron.ipcRenderer.sendMessage('app-unmaximize', []);
setIsMaximized(false);
} else {
window.electron.ipcRenderer.sendMessage('app-maximize', []);
setIsMaximized(true);
}
}}
>
{isMaximized ? <FullscreenExit /> : <Fullscreen />}
</IconButton>
</Tooltip>
<Tooltip title="Exit VisLab">
<IconButton
onClick={() => {
window.electron.ipcRenderer.sendMessage('app-close', []);
}}
>
<Clear />
</IconButton>
</Tooltip>
{children}
</Toolbar>
);
Expand Down
5 changes: 3 additions & 2 deletions src/renderer/EditorLabelVisualizerTrack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@ const EditorLabelVisualizerTrack = (props: EditorLabelVisualizerTrackProps) => {
ed.labelData.label[track][ri] !== EditorLabelNotLabelled &&
ed.labelData.label[track][ri] !== visemes.emptyStrID
) {
const tracklabData = visemes.def[ed.labelData.label[track][ri]];
if (ed.labelData.timing.length - 1 === ri) {
// Last tick
dispLabel = visemes.def[ed.labelData.label[track][ri]]?.disp;
dispLabel = tracklabData?.track_disp || tracklabData?.disp;
} else if (
ed.labelData.label[track][ri + 1] !== ed.labelData.label[track][ri]
) {
// Different label
dispLabel = visemes.def[ed.labelData.label[track][ri]]?.disp;
dispLabel = tracklabData?.track_disp || tracklabData?.disp;
}
}

Expand Down
32 changes: 24 additions & 8 deletions src/renderer/EditorNotice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const EditorNotice = () => {
style={{
fontFamily: '"Nanum Gothic Coding", monospace',
fontSmooth: 'always',
fontSize: '14px',
}}
>
<h3 className="exception-title">주의/예외 사항</h3>
Expand All @@ -28,25 +29,40 @@ const EditorNotice = () => {
<ul className="exception-list">
<li>
<span>
[초성] A타입 자음&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ [중성] B타입 단모음
말할 때{' '}
<b>
[초성] A타입 자음&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ [중성] B타입
단모음
</b>{' '}
이 나오면
</span>
&nbsp;&mdash;&nbsp;
<span className="exception-strong">
모음 앞에 <i className="unk-btn-mock btn-mock">XX</i> 추가
모음 <big></big><i className="unk-btn-mock btn-mock">XX</i>{' '}
추가
</span>
</li>
<li>
<span>[중성] B타입 단모음&nbsp;&nbsp;&nbsp;+ [종성] A타입 자음</span>
&nbsp;&nbsp;&nbsp;&mdash;&nbsp;
<span>
말할 때{' '}
<b>[중성] B타입 단모음&nbsp;&nbsp;&nbsp;+ [종성] A타입 자음</b>
&nbsp;&nbsp;&nbsp;이 나오면
</span>
&nbsp;&mdash;&nbsp;
<span className="exception-strong">
모음 뒤에 <i className="unk-btn-mock btn-mock">XX</i> 추가
모음 <big></big><i className="unk-btn-mock btn-mock">XX</i>{' '}
추가
</span>
</li>
<li>
<span>[중성] C타입 이중모음 + [종성] A타입 자음</span>
&nbsp;&nbsp;&nbsp;&mdash;&nbsp;
<span>
말할 때 <b>[중성] C타입 이중모음 + [종성] A타입 자음</b>
&nbsp;&nbsp;&nbsp;이 나오면
</span>
&nbsp;&mdash;&nbsp;
<span className="exception-strong">
모음 뒤에 <i className="unk-btn-mock btn-mock">XX</i> 추가
모음 <big></big><i className="unk-btn-mock btn-mock">XX</i>{' '}
추가
</span>
</li>
</ul>
Expand Down
84 changes: 62 additions & 22 deletions src/visemes/visemedef.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,95 +3,135 @@
"em": {
"type": "empty_str",
"disp": "-",
"desc": "공백/노이즈"
"desc": "공백/노이즈",
"keybind": "-"
},
"xx": {
"type": "unknown",
"disp": "XX",
"desc": "복합 (명시된 예외에만 사용)"
"desc": "복합 (명시된 예외에만 사용)",
"keybind": "x"
},
"ww": {
"type": "wrong",
"disp": "오류",
"desc": "말을 하지 않는데 입이 움직이는 것"
"desc": "말을 하지 않는데 입이 움직이는 것",
"keybind": "e"
},
"pm": {
"type": "typea",
"disp": "ㅁ,ㅂ,ㅃ,ㅍ"
"disp": "ㅁ,ㅂ,ㅃ,ㅍ",
"track_disp": "",
"keybind": "q",
"keybind_disp": ""
},
"aa": {
"type": "typeb",
"disp": ""
"disp": "",
"keybind": "k",
"keybind_disp": ""
},
"jy+aa": {
"type": "typeb",
"disp": ""
"disp": "",
"keybind": "i",
"keybind_disp": ""
},
"eo": {
"type": "typeb",
"disp": ""
"disp": "",
"keybind": "j",
"keybind_disp": ""
},
"jy+eo": {
"type": "typeb",
"disp": ""
"disp": "",
"keybind": "u",
"keybind_disp": ""
},
"oo": {
"type": "typeb",
"disp": ""
"disp": "",
"keybind": "h",
"keybind_disp": ""
},
"jy+oo": {
"type": "typeb",
"disp": ""
"disp": "",
"keybind": "y",
"keybind_disp": ""
},
"uu": {
"type": "typeb",
"disp": ""
"disp": "",
"keybind": "n",
"keybind_disp": ""
},
"jy+uu": {
"type": "typeb",
"disp": ""
"disp": "",
"keybind": "b",
"keybind_disp": ""
},
"eu": {
"type": "typeb",
"disp": ""
"disp": "",
"keybind": "m",
"keybind_disp": ""
},
"ii": {
"type": "typeb",
"disp": ""
"disp": "",
"keybind": "l",
"keybind_disp": ""
},
"ee": {
"type": "typec",
"disp": "ㅐ,ㅔ"
"disp": "ㅐ,ㅔ",
"track_disp": "",
"keybind": "o",
"keybind_disp": "o"
},
"jy+ee": {
"type": "typec",
"disp": "ㅒ,ㅖ"
"disp": "ㅒ,ㅖ",
"track_disp": "",
"keybind": "shift+o"
},
"ww+aa": {
"type": "typec",
"disp": ""
"disp": "",
"keybind": "a"
},
"ww+ee": {
"type": "typec",
"disp": "ㅙ,ㅚ,ㅞ"
"disp": "ㅙ,ㅚ,ㅞ",
"track_disp": "",
"keybind": "s"
},
"ww+eo": {
"type": "typec",
"disp": ""
"disp": "",
"keybind": "d"
},
"ww+ii": {
"type": "typec",
"disp": ""
"disp": "",
"keybind": "f"
},
"eu+jy": {
"type": "typec",
"disp": "",
"desc": "첫 음소가 A타입이 아닌 음절의 'ㅢ'"
"desc": "첫 음소가 A타입이 아닌 음절의 'ㅢ'",
"track_disp": "ㅢB",
"keybind": "g"
},
"eu+ii": {
"type": "typec",
"disp": "ㅢ[A]",
"desc": "첫 음소가 A타입인 음절의 'ㅢ'"
"desc": "첫 음소가 A타입인 음절의 'ㅢ'",
"track_disp": "ㅢA",
"keybind": "shift+g"
}
},
"types": {
Expand Down
2 changes: 2 additions & 0 deletions src/visemes/visemes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export type VisemeDefMap = {
disp: string;
desc?: string;
keybind?: string;
keybind_disp?: string;
track_disp?: string;
};
};

Expand Down

0 comments on commit a0b94ff

Please sign in to comment.