瀏覽代碼

Update title bar to behave as expected

Ruben 5 年之前
父節點
當前提交
23fe6e63a3
共有 1 個文件被更改,包括 6 次插入7 次删除
  1. 6 7
      PicView/UI/EditTitleBar.cs

+ 6 - 7
PicView/UI/EditTitleBar.cs

@@ -13,15 +13,14 @@ namespace PicView.UI
 
         internal static void Bar_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
         {
-            if (!mainWindow.Bar.IsFocused)
+            if (mainWindow.Bar.IsFocused)
             {
-                if (e.ClickCount == 2)
-                {
-                    WindowLogic.Maximize_Restore();
-                }
-
-                e.Handled = true;
+                return;
             }
+
+            WindowLogic.Move(sender, e);
+            Refocus();
+            e.Handled = true; // Disable text clicking
         }
 
         internal static void EditTitleBar_Text()