From 29ec9f9b021bea91e5cfedfc9602b069a935496e Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Mon, 4 Mar 2013 10:47:55 +0000 Subject: [PATCH] Corrected layout when scaling the control git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/richtext/richtextctrl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 3e0b4c7a4a..044d3c2376 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -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(); } -- 2.45.2