Corrections to HasCharacterAttributes, HasParagraphAttributes

EditProperties functions don't try to change read-only content
Page up/down behaviour now takes into account margins and scale
Transparency and y poition corrections to field labels


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2014-10-08 10:29:01 +00:00
parent e762c4ce83
commit 8c56462500
2 changed files with 24 additions and 7 deletions

View File

@@ -2639,7 +2639,10 @@ bool wxRichTextCtrl::PageDown(int noPages, int flags)
if (line)
{
wxSize clientSize = GetClientSize();
int newY = line->GetAbsolutePosition().y + noPages*clientSize.y;
int topMargin = GetBuffer().GetTopMargin();
int bottomMargin = GetBuffer().GetBottomMargin();
int height = int( 0.5 + ((clientSize.y - topMargin - bottomMargin) / GetScale()));
int newY = line->GetAbsolutePosition().y + noPages*height;
wxRichTextLine* newLine = GetFocusObject()->GetLineAtYPosition(newY);
if (newLine)