mirror of
https://github.com/greenshot/greenshot
synced 2025-07-31 04:00:13 -07:00
BUG-1965: Fixed a bug where a 1 pixel wide border around an active window is visible. Probably due to the "shadow" being captured too.
This commit is contained in:
parent
d25021631e
commit
1469f1fa41
9 changed files with 200 additions and 179 deletions
|
@ -77,10 +77,10 @@ namespace GreenshotPlugin.Controls {
|
|||
SIZE sourceSize;
|
||||
DWM.DwmQueryThumbnailSourceSize(_thumbnailHandle, out sourceSize);
|
||||
int thumbnailHeight = 200;
|
||||
int thumbnailWidth = (int)(thumbnailHeight * ((float)sourceSize.width / (float)sourceSize.height));
|
||||
int thumbnailWidth = (int)(thumbnailHeight * ((float)sourceSize.Width / (float)sourceSize.Height));
|
||||
if (parentControl != null && thumbnailWidth > parentControl.Width) {
|
||||
thumbnailWidth = parentControl.Width;
|
||||
thumbnailHeight = (int)(thumbnailWidth * ((float)sourceSize.height / (float)sourceSize.width));
|
||||
thumbnailHeight = (int)(thumbnailWidth * ((float)sourceSize.Height / (float)sourceSize.Width));
|
||||
}
|
||||
Width = thumbnailWidth;
|
||||
Height = thumbnailHeight;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue