feat: adjust control ui

This commit is contained in:
GyDi 2022-01-17 02:15:06 +08:00
parent 43af55252d
commit 3480d50f61
No known key found for this signature in database
GPG Key ID: 1C95E0D3467B3084

View File

@ -2,35 +2,37 @@ import { Button } from "@mui/material";
import { appWindow } from "@tauri-apps/api/window";
import {
CloseRounded,
CropLandscapeOutlined,
CropSquareRounded,
HorizontalRuleRounded,
} from "@mui/icons-material";
const LayoutControl = () => {
const minWidth = 40;
return (
<>
<Button
size="small"
sx={{ minWidth: 48 }}
sx={{ minWidth, svg: { transform: "scale(0.9)" } }}
onClick={() => appWindow.minimize()}
>
<HorizontalRuleRounded />
<HorizontalRuleRounded fontSize="small" />
</Button>
<Button
size="small"
sx={{ minWidth: 48 }}
sx={{ minWidth, svg: { transform: "scale(0.9)" } }}
onClick={() => appWindow.toggleMaximize()}
>
<CropLandscapeOutlined />
<CropSquareRounded fontSize="small" />
</Button>
<Button
size="small"
sx={{ minWidth: 48 }}
sx={{ minWidth, svg: { transform: "scale(1.05)" } }}
onClick={() => appWindow.hide()}
>
<CloseRounded />
<CloseRounded fontSize="small" />
</Button>
</>
);