Skip to content

Commit

Permalink
优化 搜索框显示效果
Browse files Browse the repository at this point in the history
  • Loading branch information
MakesYT committed Jun 9, 2024
1 parent 3d15efd commit e04e262
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 0 additions & 5 deletions KitopiaAvalonia/Services/SearchWindowService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ public void ShowOrHiddenSearchWindow()
{
Dispatcher.UIThread.InvokeAsync(() => {
var searchWindow = ServiceManager.Services.GetService<SearchWindow>();
if (searchWindow!.IsVisible)
{
searchWindow!.IsVisible = false;
}
else
{
ServiceManager.Services.GetService<SearchWindowViewModel>()!.CheckClipboard();
searchWindow.Show();
Expand Down
5 changes: 5 additions & 0 deletions KitopiaAvalonia/Windows/SearchWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ public SearchWindow()

public override void Show()
{
if (!IsLoaded)
{
base.Show();
}

ServiceManager.Services.GetService<IWindowTool>()!.MoveWindowToMouseScreenCenter(this);
base.Show();
ServiceManager.Services.GetService<IWindowTool>()!.SetForegroundWindow(
Expand Down

0 comments on commit e04e262

Please sign in to comment.