Skip to content

Commit

Permalink
Fix DPI resize bug when importing PNGs
Browse files Browse the repository at this point in the history
  • Loading branch information
soopercool101 committed Nov 14, 2018
1 parent 9489697 commit 19bb554
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions BrawlBox/BrawlBox.csproj
Expand Up @@ -166,6 +166,7 @@
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="NodeWrappers\ClassicStageTblWrapper.cs" />
Expand Down
3 changes: 3 additions & 0 deletions BrawlBox/Properties/AssemblyInfo.cs
Expand Up @@ -26,6 +26,9 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("aa25c3c0-9c54-4fd2-81bc-96efb4953a7b")]

// This prevents resizes on monitors with different DPIs
[assembly: System.Windows.Media.DisableDpiAwareness]

// Version information for an assembly consists of the following four values:
//
// Major Version
Expand Down
4 changes: 2 additions & 2 deletions BrawlBox/UI/Model Previewer/ModelEditControl/MiscFunctions.cs
Expand Up @@ -106,12 +106,12 @@ private void ModelEditControl_SizeChanged(object sender, EventArgs e)
public void CheckDimensions()
{
int totalWidth = animEditors.Width;

This comment has been minimized.

Copy link
@Milddy

Milddy Sep 10, 2021

BrawlBox/UI/Model Previewer/ModelEditControl/MiscFunctions.cs

Size s = new Size(animCtrlPnl.Width, animEditors.Height);
Drawing.Size s = new Drawing.Size(animCtrlPnl.Width, animEditors.Height);
if (_currentControl != null && _currentControl.Visible)
{
s = _currentControl.Visible ?
(_currentControl is SCN0Editor ? scn0Editor.GetDimensions() : _currentControl.MinimumSize) :
(!weightEditor.Visible && !vertexEditor.Visible ? new Size(0, 0) : s);
(!weightEditor.Visible && !vertexEditor.Visible ? new Drawing.Size(0, 0) : s);
}
else if (!weightEditor.Visible && !vertexEditor.Visible)
s = new Drawing.Size(0, 0);
Expand Down
3 changes: 3 additions & 0 deletions BrawlLib/Properties/AssemblyInfo.cs
Expand Up @@ -21,6 +21,9 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("84b5ec46-630b-4225-beec-6082c28f85e6")]

// This prevents resizes on monitors with different DPIs
[assembly: System.Windows.Media.DisableDpiAwareness]

// Version information for an assembly consists of the following four values:
//
// Major Version
Expand Down
3 changes: 3 additions & 0 deletions Ikarus/Properties/AssemblyInfo.cs
Expand Up @@ -27,6 +27,9 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("3a58aa6c-1b11-4e61-af15-51b70da5035a")]

// This prevents resizes on monitors with different DPIs
[assembly: System.Windows.Media.DisableDpiAwareness]

// Version information for an assembly consists of the following four values:
//
// Major Version
Expand Down
1 change: 1 addition & 0 deletions Updater/Net.csproj
Expand Up @@ -102,6 +102,7 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
Expand Down
3 changes: 3 additions & 0 deletions Updater/Properties/AssemblyInfo.cs
Expand Up @@ -22,6 +22,9 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ee562171-2908-40ce-ba2d-35ff76fe9055")]

// This prevents resizes on monitors with different DPIs
[assembly: System.Windows.Media.DisableDpiAwareness]

// Version information for an assembly consists of the following four values:
//
// Major Version
Expand Down

0 comments on commit 19bb554

Please sign in to comment.