From 226ad0cf506fd109a2315504d1efcbbe48e772d0 Mon Sep 17 00:00:00 2001 From: wzxjohn Date: Mon, 19 Mar 2018 10:23:43 +0800 Subject: [PATCH] Fix wrong splash on multi display (#1729) Because the splash is already on the target display, the target rect doesn't need to calculate with the screen position. --- shadowsocks-csharp/View/MenuViewController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks-csharp/View/MenuViewController.cs b/shadowsocks-csharp/View/MenuViewController.cs index c9b188a..b1c88c5 100644 --- a/shadowsocks-csharp/View/MenuViewController.cs +++ b/shadowsocks-csharp/View/MenuViewController.cs @@ -738,7 +738,7 @@ namespace Shadowsocks.View splash.Location = new Point(screen.Bounds.X, screen.Bounds.Y); // we need a panel because a window has a minimal size // TODO: test on high DPI - splash.TargetRect = new Rectangle((int)minX + screen.Bounds.X, (int)minY + screen.Bounds.Y, (int)maxX - (int)minX, (int)maxY - (int)minY); + splash.TargetRect = new Rectangle((int)minX, (int)minY, (int)maxX - (int)minX, (int)maxY - (int)minY); splash.Size = new Size(fullImage.Width, fullImage.Height); splash.Show(); return;