mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 04:00:07 +00:00
Use Math.Round to caculate win32 physical size. (#17)
At some dpi, dpi * wpf size may get non-integer win32 physical size. And convert it to integer directly may cause that the browser size is one pixel smaller than expected.
This commit is contained in:
@@ -1680,8 +1680,8 @@ namespace CefSharp.Wpf.HwndHost
|
||||
{
|
||||
if (dpiScale > 1)
|
||||
{
|
||||
width = (int)(width * dpiScale);
|
||||
height = (int)(height * dpiScale);
|
||||
width = (int)Math.Round(width * dpiScale);
|
||||
height = (int)Math.Round(height * dpiScale);
|
||||
}
|
||||
|
||||
managedCefBrowserAdapter.Resize(width, height);
|
||||
|
||||
Reference in New Issue
Block a user