Improve DPI support (#254)

* Improving the DPI handling for most forms, there are still issues with:
* the AboutForm.Designer.cs where the title with the version scales differently.
* the destination picker doesn't seem to scale the font correctly.
Some parts are not tested yet...

* Solved the issue with the destination picker font, and some other small issues.
There still is an issue when using Powertoys (the feature which is experimental), that the capture is somehow skipping.
This commit is contained in:
Robin Krom 2020-10-23 00:28:50 +02:00 committed by GitHub
commit 94c778d82c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 216 additions and 216 deletions

View file

@ -102,13 +102,12 @@ namespace Greenshot {
propertiesToolStrip.ImageScalingSize = newSize;
propertiesToolStrip.MinimumSize = new Size(150, newSize.Height + 10);
_surface.AdjustToDpi(dpi);
_surface?.AdjustToDpi(dpi);
UpdateUi();
}
public ImageEditorForm(ISurface iSurface, bool outputMade)
{
// Make sure we change the icon size depending on the scaling
DpiChanged += AdjustToDpi;
EditorList.Add(this);
//
@ -116,6 +115,8 @@ namespace Greenshot {
//
ManualLanguageApply = true;
InitializeComponent();
// Make sure we change the icon size depending on the scaling
DpiChanged += AdjustToDpi;
Load += delegate {
var thread = new Thread(AddDestinations)
{
@ -236,7 +237,10 @@ namespace Greenshot {
MouseWheel += PanelMouseWheel;
// Make sure the value is set correctly when starting
counterUpDown.Value = Surface.CounterStart;
if (Surface != null)
{
counterUpDown.Value = Surface.CounterStart;
}
ApplyLanguage();
}