Improve code quality

This commit is contained in:
Jack251970 2025-03-19 18:03:02 +08:00
parent aaca0c0a4a
commit 9cb31c8661
2 changed files with 5 additions and 11 deletions

View file

@ -299,15 +299,8 @@ namespace Flow.Launcher.Infrastructure
#region WndProc
public static bool WM_ENTERSIZEMOVE(uint msg)
{
return msg == PInvoke.WM_ENTERSIZEMOVE;
}
public static bool WM_EXITSIZEMOVE(uint msg)
{
return msg == PInvoke.WM_EXITSIZEMOVE;
}
public const int WM_ENTERSIZEMOVE = (int)PInvoke.WM_ENTERSIZEMOVE;
public const int WM_EXITSIZEMOVE = (int)PInvoke.WM_EXITSIZEMOVE;
#endregion

View file

@ -212,17 +212,18 @@ namespace Flow.Launcher
break;
}
};
// ✅ QueryTextBox.Text 변경 감지 (글자 수 1 이상일 때만 동작하도록 수정)
QueryTextBox.TextChanged += (sender, e) => UpdateClockPanelVisibility();
// ✅ ContextMenu.Visibility 변경 감지
DependencyPropertyDescriptor
.FromProperty(UIElement.VisibilityProperty, typeof(ContextMenu))
.FromProperty(VisibilityProperty, typeof(ContextMenu))
.AddValueChanged(ContextMenu, (s, e) => UpdateClockPanelVisibility());
// ✅ History.Visibility 변경 감지
DependencyPropertyDescriptor
.FromProperty(UIElement.VisibilityProperty, typeof(StackPanel)) // History는 StackPanel이라고 가정
.FromProperty(VisibilityProperty, typeof(StackPanel)) // History는 StackPanel이라고 가정
.AddValueChanged(History, (s, e) => UpdateClockPanelVisibility());
}