Skip to content

Commit

Permalink
Merge pull request #17 from brhinescot/support-high-dpi
Browse files Browse the repository at this point in the history
Support high dpi
  • Loading branch information
brhinescot authored Apr 20, 2018
2 parents 18c331a + 1a39648 commit 6c6169c
Show file tree
Hide file tree
Showing 31 changed files with 2,173 additions and 1,639 deletions.
2 changes: 1 addition & 1 deletion src/Cropper.BmpFormat/Cropper.BmpFormat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand Down
6 changes: 1 addition & 5 deletions src/Cropper.ClipboardFormat/Cropper.ClipboardFormat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand Down Expand Up @@ -149,10 +149,6 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Skybound.VisualStyles, Version=2.0.0.0, Culture=neutral, PublicKeyToken=f2d73a45b3e75a83">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\Skybound.VisualStyles.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
Expand Down
156 changes: 99 additions & 57 deletions src/Cropper.ClipboardFormat/Options.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions src/Cropper.ClipboardFormat/Options.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#region Using Directives

using System;
using System.Windows.Forms;
using Fusion8.Cropper.Extensibility;

#endregion
Expand Down Expand Up @@ -56,5 +57,15 @@ private void HandleQualitySliderValueChanged(object sender, EventArgs e)
{
imageQuality.Text = SR.ImageQuality(ImageQuality);
}

protected override void OnDpiChanged(DpiChangedEventArgs e)
{
base.OnDpiChanged(e);
}

protected override void OnDpiChangedBeforeParent(EventArgs e)
{
base.OnDpiChangedBeforeParent(e);
}
}
}
4 changes: 2 additions & 2 deletions src/Cropper.ClipboardFormat/Options.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
30 changes: 30 additions & 0 deletions src/Cropper.Core/ControlExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#region Using Directives

using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

#endregion

namespace Fusion8.Cropper.Core
{
public static class ControlExtensions
{
public static IEnumerable<Control> GetControlHierarchy(this Control root)
{
var queue = new Queue<Control>();

queue.Enqueue(root);

do
{
Control control = queue.Dequeue();

yield return control;

foreach (Control child in control.Controls.OfType<Control>())
queue.Enqueue(child);
} while (queue.Count > 0);
}
}
}
7 changes: 2 additions & 5 deletions src/Cropper.Core/Cropper.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand Down Expand Up @@ -155,10 +155,6 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Skybound.VisualStyles">
<Name>skybound.visualstyles</Name>
<HintPath>..\..\lib\skybound.visualstyles.dll</HintPath>
</Reference>
<Reference Include="System">
<Name>System</Name>
</Reference>
Expand Down Expand Up @@ -193,6 +189,7 @@
<Compile Include="Configuration.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="ControlExtensions.cs" />
<Compile Include="CropSize.cs" />
<Compile Include="DropDownButton.cs">
<SubType>Component</SubType>
Expand Down
Loading

0 comments on commit 6c6169c

Please sign in to comment.