[Update/Prepare] Prepare for window transparency feature.
This commit is contained in:
@@ -32,6 +32,9 @@ html, body {
|
||||
|
||||
#root {
|
||||
height: 100%;
|
||||
|
||||
/* For controlling a whole window transparency */
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* SVG内のすべての要素にfillを適用 (colorの調整をcssでするため) */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getCurrent } from "@tauri-apps/api/window";
|
||||
import { useEffect, useRef } from "react";
|
||||
import styles from "./MainWindow.module.scss";
|
||||
|
||||
import { SidebarSection } from "./sidebar_section/SidebarSection";
|
||||
import { MainSection } from "./main_section/MainSection";
|
||||
import { useStartPython } from "@logics/useStartPython";
|
||||
@@ -8,8 +8,10 @@ import { useStartPython } from "@logics/useStartPython";
|
||||
export const MainWindow = () => {
|
||||
const { asyncStartPython } = useStartPython();
|
||||
const hasRunRef = useRef(false);
|
||||
const main_window = getCurrent();
|
||||
|
||||
useEffect(() => {
|
||||
main_window.setDecorations(true);
|
||||
if (!hasRunRef.current) {
|
||||
asyncStartPython();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user