[Update] Add feature Restore Main Window Geometry.

Note: the toggle-able setting, to restore or don't, has removed for now.
This commit is contained in:
Sakamoto Shiina
2024-10-13 03:57:23 +09:00
parent 0c3b36a43d
commit 0582091908
12 changed files with 183 additions and 22 deletions

View File

@@ -6,6 +6,7 @@ import { ConfigPage } from "./config_page/ConfigPage";
import styles from "./App.module.scss";
export const App = () => {
const { WindowGeometryController } = useWindow();
return (
<div className={styles.container}>
<StartPythonFacadeComponent />
@@ -14,6 +15,7 @@ export const App = () => {
<UiSizeController />
<FontFamilyController />
<TransparencyController />
<WindowGeometryController />
<WindowTitleBar />
<div className={styles.pages_wrapper}>
@@ -24,6 +26,11 @@ export const App = () => {
);
};
import {
useWindow,
useVolume,
useIsOpenedConfigPage,
} from "@logics_common";
import {
useSoftwareVersion,
@@ -59,6 +66,8 @@ const StartPythonFacadeComponent = () => {
const hasRunRef = useRef(false);
const { asyncFetchFonts } = useAsyncFetchFonts();
const { fetchAndUpdateWindowGeometry } = useWindow();
const { getMicHostList } = useMicHostList();
const { getMicDeviceList } = useMicDeviceList();
const { getSpeakerDeviceList } = useSpeakerDeviceList();
@@ -97,6 +106,8 @@ const StartPythonFacadeComponent = () => {
asyncStartPython().then(() => {
startFeedingToWatchDog();
fetchAndUpdateWindowGeometry();
getUiLanguage();
getUiScaling();
getMessageLogUiScaling();
@@ -156,10 +167,6 @@ const UiLanguageController = () => {
};
import { useStore_MainFunctionsStateMemory } from "@store";
import {
useVolume,
useIsOpenedConfigPage,
} from "@logics_common";
const ConfigPageCloseTrigger = () => {
const { currentIsOpenedConfigPage } = useIsOpenedConfigPage();