Skip to content

Commit 5a34963

Browse files
committed
美化
1 parent b6342e7 commit 5a34963

File tree

4 files changed

+46
-14
lines changed

4 files changed

+46
-14
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div class="d-flex align-start @Class">
2-
3-
<MudIconButton Icon="@Icons.Material.Filled.Minimize"
2+
<MudIconButton Icon="@Icons.Material.Filled.Remove"
43
Size="Size.Small"
5-
OnClick="MinimizeAsync" />
4+
OnClick="MinimizeAsync"
5+
Class="titlebar-btn" />
66

77
@* <MudIconButton Icon=@(_maximizerIcon)
88
Size="Size.Medium"
@@ -11,5 +11,6 @@
1111

1212
<MudIconButton Icon="@Icons.Material.Filled.Close"
1313
Size="Size.Small"
14-
OnClick="CloseAsync" />
14+
OnClick="CloseAsync"
15+
Class="titlebar-btn close-btn" />
1516
</div>

src/ComputerLock/Shared/MainLayout.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
<MudThemeProvider @ref="@_mudThemeProvider" @bind-IsDarkMode="@_isDarkMode" Theme="_customTheme" />
44
<MudPopoverProvider />
5-
<MudDialogProvider/>
5+
<MudDialogProvider />
66
<MudSnackbarProvider />
77

8-
<MudLayout>
8+
<MudLayout Class="@(_isDarkMode ? "dark-mode" : "light-mode")">
99
<MudAppBar Class="px-2"
1010
Elevation="25"
1111
Gutters="false"

src/ComputerLock/Shared/MainLayout.razor.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected override async Task OnInitializedAsync()
5252
{
5353
LayoutProperties = new LayoutProperties
5454
{
55-
AppbarHeight = "32px",
55+
AppbarHeight = "36px",
5656
DrawerWidthLeft = "200px"
5757
},
5858

@@ -64,8 +64,6 @@ protected override async Task OnInitializedAsync()
6464
AppbarText = "#FFA500",
6565
Background = "#FFFFFF",
6666
Surface = "#FFFFFF",
67-
TableStriped = "#FAFAFA",
68-
TableHover = "#E3F2FD",
6967
LinesDefault = "#E0E0E0",
7068

7169
Success = "#43A047",
@@ -76,7 +74,8 @@ protected override async Task OnInitializedAsync()
7674
TextSecondary = "#616161",
7775
DrawerBackground = "#FFFFFF",
7876
DrawerText = "#212121",
79-
ActionDefault = "#9E9E9E"
77+
ActionDefault = "#FFE2B0",
78+
HoverOpacity = 0.2
8079
},
8180

8281
PaletteDark = new PaletteDark()
@@ -87,8 +86,6 @@ protected override async Task OnInitializedAsync()
8786
AppbarText = "#FFA500",
8887
Background = "#212121",
8988
Surface = "#424242",
90-
TableStriped = "#292929",
91-
TableHover = "#37474F",
9289
LinesDefault = "#555555",
9390

9491
Success = "#66BB6A",
@@ -99,7 +96,8 @@ protected override async Task OnInitializedAsync()
9996
TextSecondary = "#B0BEC5",
10097
DrawerBackground = "#2C2C2C",
10198
DrawerText = "#FFFFFF",
102-
ActionDefault = "#BDBDBD"
99+
ActionDefault = "#505050",
100+
HoverOpacity = 0.2
103101
}
104102
};
105103

src/ComputerLock/wwwroot/app.css

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ body,
1010
display: none;
1111
}
1212

13+
.mud-appbar.mud-appbar-fixed-top {
14+
padding-right: 0 !important;
15+
}
16+
1317
.app-icon {
1418
width: 20px;
1519
height: 20px;
@@ -27,4 +31,33 @@ body,
2731
.mud-nav-link.active:not(.mud-nav-link-disabled) .mud-icon-root {
2832
color: var(--mud-palette-primary) !important;
2933
font-weight: var(--mud-typography-default-weight) !important;
30-
}
34+
}
35+
36+
.titlebar-btn.mud-icon-button {
37+
border-radius: 0 !important;
38+
padding: 8px !important;
39+
color: #424242 !important;
40+
}
41+
42+
.titlebar-btn.mud-icon-button:hover {
43+
background-color: #E0E0E0 !important;
44+
}
45+
46+
47+
.dark-mode .titlebar-btn.mud-icon-button {
48+
color: #CCCCCC !important;
49+
}
50+
51+
.dark-mode .titlebar-btn.mud-icon-button:hover {
52+
background-color: #333333 !important;
53+
}
54+
55+
.close-btn.mud-icon-button:hover {
56+
background-color: #E57373 !important;
57+
color: #FFFFFF !important;
58+
}
59+
60+
.dark-mode .close-btn.mud-icon-button:hover {
61+
background-color: #E81123 !important;
62+
color: #FFFFFF !important;
63+
}

0 commit comments

Comments
 (0)