]> git.saurik.com Git - wxWidgets.git/commitdiff
Corrected layout when scaling the control
authorJulian Smart <julian@anthemion.co.uk>
Mon, 4 Mar 2013 10:47:55 +0000 (10:47 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 4 Mar 2013 10:47:55 +0000 (10:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/richtext/richtextctrl.cpp

index 3e0b4c7a4a69e66b325a058702c3afa35ec593a6..044d3c237698dc13b05a0a3b2b2c0be259e827b2 100644 (file)
@@ -3890,6 +3890,7 @@ bool wxRichTextCtrl::LayoutContent(bool onlyVisibleRect)
 
         PrepareDC(dc);
         dc.SetFont(GetFont());
+        dc.SetUserScale(GetScale(), GetScale());
 
         wxRichTextDrawingContext context(& GetBuffer());
         GetBuffer().Defragment(context);
@@ -3897,6 +3898,8 @@ bool wxRichTextCtrl::LayoutContent(bool onlyVisibleRect)
         GetBuffer().Layout(dc, context, availableSpace, availableSpace, flags);
         GetBuffer().Invalidate(wxRICHTEXT_NONE);
 
+        dc.SetUserScale(1.0, 1.0);
+
         if (!IsFrozen() && !onlyVisibleRect)
             SetupScrollbars();
     }