From 71d046d06348064097f86cdfa5642f0d978edc5f Mon Sep 17 00:00:00 2001 From: Miepee <38186597+Miepee@users.noreply.github.com> Date: Wed, 16 Feb 2022 13:00:16 +0100 Subject: [PATCH] Replace magic values with proper variables. --- AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs index 283058c..bc400c2 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.Events.cs @@ -682,9 +682,9 @@ namespace AM2RLauncher // Get drawing variables float height = drawable.Height; float width = drawable.Width; - //TODO: apparently winforms is the big outlier here. Works normal on wpf, I have *no* idea why, investigate and submit issue at eto - float scaleDivisor = OS.IsWindows ? 955f : 715f; // Magic brute-forced values. Don't ask questions, because we don't have answers >_> - // Also, seems like nix systems share the same scaleDivisor. Again, don't ask. + //TODO: apparently winforms is the big outlier here. Works normal on wpf, I have *no* idea why, seems related to our image. issue has been submitted at eto + float scaleDivisor = OS.IsWindows ? formBG.Width : formBG.Height; + float scale = height / scaleDivisor; // Do the actual scaling