Piaz files wasn't associated during setup.
[master-thesis.git] / Parasitemia / ParasitemiaUI / About.fs
index 18f266f..908ccd5 100644 (file)
@@ -11,8 +11,9 @@ open System.Diagnostics
 let showWindow (parent: Window) =
     let win = Views.AboutWindow()
     win.Root.Owner <- parent
-    win.Root.Left <- parent.Left + parent.ActualWidth / 2. - win.Root.Width / 2.
-    win.Root.Top <- parent.Top + parent.ActualHeight / 2. - win.Root.Height / 2.
+
+    win.Root.Left <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Left) + parent.ActualWidth / 2. - win.Root.Width / 2.
+    win.Root.Top <- (if parent.WindowState = WindowState.Maximized then 0. else parent.Top) + parent.ActualHeight / 2. - win.Root.Height / 2.
 
     let version = System.Reflection.Assembly.GetEntryAssembly().GetName().Version
     let txtVersion = sprintf " %d.%d.%d" version.Major version.Minor version.Revision