Permalink
Browse files

Fix sizing bug in HD(tm)

  • Loading branch information...
1 parent 5eeae28 commit cf21c2bbe88c9dcb489928f1d408ac42f69e9ede @paulcbetts committed Apr 9, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 CefSharp/CefWpfWebBrowser.cpp
@@ -243,7 +243,12 @@ namespace CefSharp
{
if (!System::ComponentModel::DesignerProperties::GetIsInDesignMode(this))
{
- _clientAdapter->GetCefBrowser()->SetSize(PET_VIEW, (int)size.Width, (int)size.Height);
+ PresentationSource^ source = PresentationSource::FromVisual(this);
+ Matrix^ deviceTransform = source->CompositionTarget->TransformToDevice;
+
+ Point^ deviceSize = deviceTransform->Transform(Point(size.Width, size.Height));
+
+ _clientAdapter->GetCefBrowser()->SetSize(PET_VIEW, (int)deviceSize->X, (int)deviceSize->Y);
}
}
catch (...)

3 comments on commit cf21c2b

what bug does this fix?

Owner

paulcbetts replied Apr 10, 2012

Please sign in to comment.