2022-01-16 03:11:07 +08:00
|
|
|
import { Button } from "@mui/material";
|
|
|
|
|
import { appWindow } from "@tauri-apps/api/window";
|
|
|
|
|
import {
|
|
|
|
|
CloseRounded,
|
|
|
|
|
CropLandscapeOutlined,
|
|
|
|
|
HorizontalRuleRounded,
|
|
|
|
|
} from "@mui/icons-material";
|
|
|
|
|
|
2022-01-16 18:30:25 +08:00
|
|
|
const LayoutControl = () => {
|
2022-01-16 03:11:07 +08:00
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
<Button
|
|
|
|
|
size="small"
|
|
|
|
|
sx={{ minWidth: 48 }}
|
|
|
|
|
onClick={() => appWindow.minimize()}
|
|
|
|
|
>
|
|
|
|
|
<HorizontalRuleRounded />
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
size="small"
|
|
|
|
|
sx={{ minWidth: 48 }}
|
|
|
|
|
onClick={() => appWindow.toggleMaximize()}
|
|
|
|
|
>
|
|
|
|
|
<CropLandscapeOutlined />
|
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
size="small"
|
|
|
|
|
sx={{ minWidth: 48 }}
|
|
|
|
|
onClick={() => appWindow.hide()}
|
|
|
|
|
>
|
|
|
|
|
<CloseRounded />
|
|
|
|
|
</Button>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
2022-01-16 18:30:25 +08:00
|
|
|
export default LayoutControl;
|