feat: Optimize control button style

This commit is contained in:
MystiPanda 2024-01-09 16:04:56 +08:00
parent 5ceac03db1
commit e28452cc7b
2 changed files with 19 additions and 6 deletions

View File

@ -77,8 +77,8 @@
.the-bar { .the-bar {
position: absolute; position: absolute;
top: 2px; top: 0px;
right: 8px; right: 0px;
height: 36px; height: 36px;
display: flex; display: flex;
align-items: center; align-items: center;

View File

@ -1,4 +1,4 @@
import { Button } from "@mui/material"; import { Button, ButtonGroup } from "@mui/material";
import { appWindow } from "@tauri-apps/api/window"; import { appWindow } from "@tauri-apps/api/window";
import { import {
CloseRounded, CloseRounded,
@ -20,7 +20,16 @@ export const LayoutControl = () => {
}); });
return ( return (
<> <ButtonGroup
variant="text"
sx={{
height: "100%",
".MuiButtonGroup-grouped": {
borderRadius: "0px",
borderRight: "0px",
},
}}
>
<Button <Button
size="small" size="small"
sx={{ minWidth, svg: { transform: "scale(0.9)" } }} sx={{ minWidth, svg: { transform: "scale(0.9)" } }}
@ -66,11 +75,15 @@ export const LayoutControl = () => {
<Button <Button
size="small" size="small"
sx={{ minWidth, svg: { transform: "scale(1.05)" } }} sx={{
minWidth,
svg: { transform: "scale(1.05)" },
":hover": { bgcolor: "#ff000090" },
}}
onClick={() => appWindow.close()} onClick={() => appWindow.close()}
> >
<CloseRounded fontSize="small" /> <CloseRounded fontSize="small" />
</Button> </Button>
</> </ButtonGroup>
); );
}; };