mirror of
https://github.com/Leonmmcoset/CMLeonOS.git
synced 2026-04-21 19:24:00 +00:00
增加粉色
This commit is contained in:
@@ -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++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user