|
@@ -5,6 +5,8 @@ import {
|
|
CropSquareRounded,
|
|
CropSquareRounded,
|
|
FilterNoneRounded,
|
|
FilterNoneRounded,
|
|
HorizontalRuleRounded,
|
|
HorizontalRuleRounded,
|
|
|
|
+ PushPinOutlined,
|
|
|
|
+ PushPinRounded,
|
|
} from "@mui/icons-material";
|
|
} from "@mui/icons-material";
|
|
import { useState } from "react";
|
|
import { useState } from "react";
|
|
|
|
|
|
@@ -12,12 +14,28 @@ export const LayoutControl = () => {
|
|
const minWidth = 40;
|
|
const minWidth = 40;
|
|
|
|
|
|
const [isMaximized, setIsMaximized] = useState(false);
|
|
const [isMaximized, setIsMaximized] = useState(false);
|
|
|
|
+ const [isPined, setIsPined] = useState(false);
|
|
appWindow.isMaximized().then((isMaximized) => {
|
|
appWindow.isMaximized().then((isMaximized) => {
|
|
setIsMaximized(() => isMaximized);
|
|
setIsMaximized(() => isMaximized);
|
|
});
|
|
});
|
|
|
|
|
|
return (
|
|
return (
|
|
<>
|
|
<>
|
|
|
|
+ <Button
|
|
|
|
+ size="small"
|
|
|
|
+ sx={{ minWidth, svg: { transform: "scale(0.9)" } }}
|
|
|
|
+ onClick={() => {
|
|
|
|
+ appWindow.setAlwaysOnTop(!isPined);
|
|
|
|
+ setIsPined((isPined) => !isPined);
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ {isPined ? (
|
|
|
|
+ <PushPinRounded fontSize="small" />
|
|
|
|
+ ) : (
|
|
|
|
+ <PushPinOutlined fontSize="small" />
|
|
|
|
+ )}
|
|
|
|
+ </Button>
|
|
|
|
+
|
|
<Button
|
|
<Button
|
|
size="small"
|
|
size="small"
|
|
sx={{ minWidth, svg: { transform: "scale(0.9)" } }}
|
|
sx={{ minWidth, svg: { transform: "scale(0.9)" } }}
|