mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
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:
parent
d8aeab5514
commit
94c778d82c
37 changed files with 216 additions and 216 deletions
|
@ -846,7 +846,7 @@ namespace Greenshot.Helpers {
|
|||
// Restore the window making sure it's visible!
|
||||
windowToCapture.Restore();
|
||||
} else {
|
||||
windowToCapture.ToForeground(false);
|
||||
windowToCapture.ToForeground();
|
||||
}
|
||||
tmpCapture = windowToCapture.CaptureGdiWindow(captureForWindow);
|
||||
if (tmpCapture != null) {
|
||||
|
@ -941,7 +941,7 @@ namespace Greenshot.Helpers {
|
|||
}
|
||||
|
||||
private void SetDpi() {
|
||||
// Workaround for proble with DPI retrieval, the FromHwnd activates the window...
|
||||
// Workaround for problem with DPI retrieval, the FromHwnd activates the window...
|
||||
WindowDetails previouslyActiveWindow = WindowDetails.GetActiveWindow();
|
||||
// Workaround for changed DPI settings in Windows 7
|
||||
var mainForm = SimpleServiceProvider.Current.GetInstance<MainForm>();
|
||||
|
@ -950,7 +950,7 @@ namespace Greenshot.Helpers {
|
|||
_capture.CaptureDetails.DpiY = graphics.DpiY;
|
||||
}
|
||||
// Set previouslyActiveWindow as foreground window
|
||||
previouslyActiveWindow?.ToForeground(false);
|
||||
previouslyActiveWindow?.ToForeground();
|
||||
if (_capture.CaptureDetails != null) {
|
||||
((Bitmap) _capture.Image)?.SetResolution(_capture.CaptureDetails.DpiX, _capture.CaptureDetails.DpiY);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue