mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 14:53:44 +08:00
42 lines
951 B
TypeScript
42 lines
951 B
TypeScript
import { Button } from "@mui/material";
|
|
import { appWindow } from "@tauri-apps/api/window";
|
|
import {
|
|
CloseRounded,
|
|
CropSquareRounded,
|
|
HorizontalRuleRounded,
|
|
} from "@mui/icons-material";
|
|
|
|
const LayoutControl = () => {
|
|
const minWidth = 40;
|
|
|
|
return (
|
|
<>
|
|
<Button
|
|
size="small"
|
|
sx={{ minWidth, svg: { transform: "scale(0.9)" } }}
|
|
onClick={() => appWindow.minimize()}
|
|
>
|
|
<HorizontalRuleRounded fontSize="small" />
|
|
</Button>
|
|
|
|
<Button
|
|
size="small"
|
|
sx={{ minWidth, svg: { transform: "scale(0.9)" } }}
|
|
onClick={() => appWindow.toggleMaximize()}
|
|
>
|
|
<CropSquareRounded fontSize="small" />
|
|
</Button>
|
|
|
|
<Button
|
|
size="small"
|
|
sx={{ minWidth, svg: { transform: "scale(1.05)" } }}
|
|
onClick={() => appWindow.close()}
|
|
>
|
|
<CloseRounded fontSize="small" />
|
|
</Button>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default LayoutControl;
|