mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-04-21 10:53:59 +00:00
增加粉色
This commit is contained in:
@@ -1 +1 @@
|
||||
2026-04-04 13:54:37
|
||||
2026-04-04 14:22:16
|
||||
@@ -1 +1 @@
|
||||
2f9df41
|
||||
121d30f
|
||||
@@ -11,7 +11,7 @@ namespace CMLeonOS.Gui.UILib
|
||||
{
|
||||
hostWindow = parent;
|
||||
OnClick = (_, _) => ToggleExpanded();
|
||||
OnUnfocused = Collapse;
|
||||
OnUnfocused = HandleUnfocused;
|
||||
}
|
||||
|
||||
private readonly Window hostWindow;
|
||||
@@ -149,6 +149,17 @@ namespace CMLeonOS.Gui.UILib
|
||||
Render();
|
||||
}
|
||||
|
||||
private void HandleUnfocused()
|
||||
{
|
||||
Window nextFocus = WM.PendingFocusTarget;
|
||||
if (nextFocus == popupTable || nextFocus == popupWindow)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Collapse();
|
||||
}
|
||||
|
||||
private void ToggleExpanded()
|
||||
{
|
||||
if (Expanded)
|
||||
@@ -288,6 +299,8 @@ namespace CMLeonOS.Gui.UILib
|
||||
popupTable.SelectedBorder = Highlight;
|
||||
popupTable.SelectedForeground = Foreground;
|
||||
popupTable.TableCellSelected = PopupSelected;
|
||||
popupTable.OnUnfocused = Collapse;
|
||||
popupWindow.OnUnfocused = Collapse;
|
||||
|
||||
for (int i = 0; i < Items.Count; i++)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CMLeonOS.Gui.UILib
|
||||
|
||||
internal static string[] GetThemeNames()
|
||||
{
|
||||
return new string[] { "Default", "Graphite", "Forest", "Sunset", "Rose", "Terminal" };
|
||||
return new string[] { "Default", "Graphite", "Forest", "Sunset", "Rose", "Pink", "Terminal" };
|
||||
}
|
||||
|
||||
internal static void ApplyTheme(string themeName)
|
||||
@@ -140,6 +140,28 @@ namespace CMLeonOS.Gui.UILib
|
||||
CurrentThemeName = "Rose";
|
||||
break;
|
||||
|
||||
case "Pink":
|
||||
WindowTitleBackground = Color.FromArgb(106, 34, 82);
|
||||
WindowTitleTopHighlight = Color.FromArgb(156, 74, 128);
|
||||
WindowTitleBottomBorder = Color.FromArgb(58, 17, 44);
|
||||
WindowTitleText = Color.FromArgb(255, 242, 250);
|
||||
WindowButtonBackground = Color.FromArgb(132, 52, 104);
|
||||
|
||||
Surface = Color.FromArgb(255, 244, 250);
|
||||
SurfaceMuted = Color.FromArgb(246, 226, 238);
|
||||
SurfaceBorder = Color.FromArgb(198, 154, 178);
|
||||
TextPrimary = Color.FromArgb(84, 32, 64);
|
||||
TextSecondary = Color.FromArgb(136, 92, 116);
|
||||
|
||||
Accent = Color.FromArgb(232, 84, 164);
|
||||
AccentDark = Color.FromArgb(191, 56, 129);
|
||||
AccentLight = Color.FromArgb(255, 212, 236);
|
||||
|
||||
Success = Color.FromArgb(72, 161, 118);
|
||||
Warning = Color.FromArgb(216, 142, 65);
|
||||
CurrentThemeName = "Pink";
|
||||
break;
|
||||
|
||||
case "Terminal":
|
||||
WindowTitleBackground = Color.FromArgb(14, 22, 14);
|
||||
WindowTitleTopHighlight = Color.FromArgb(33, 60, 33);
|
||||
|
||||
@@ -59,6 +59,7 @@ namespace CMLeonOS.Gui
|
||||
internal uint ScreenHeight { get; private set; }
|
||||
|
||||
internal Window Focus { get; set; }
|
||||
internal Window PendingFocusTarget { get; private set; }
|
||||
|
||||
private uint bytesPerPixel { get; set; }
|
||||
|
||||
@@ -233,6 +234,8 @@ namespace CMLeonOS.Gui
|
||||
return;
|
||||
}
|
||||
|
||||
PendingFocusTarget = window;
|
||||
|
||||
if (Focus != null && Focus != window)
|
||||
{
|
||||
Focus.OnUnfocused?.Invoke();
|
||||
@@ -240,6 +243,7 @@ namespace CMLeonOS.Gui
|
||||
|
||||
Focus = window;
|
||||
window.OnFocused?.Invoke();
|
||||
PendingFocusTarget = null;
|
||||
|
||||
if (updateDock)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user