From c65916bcafc01344e0f7a34711d3aa005afee202 Mon Sep 17 00:00:00 2001 From: martin Date: Wed, 11 Jul 2012 02:01:46 +0000 Subject: [PATCH] IDE-Options / SynEdit: Fixed RightEdge visibility git-svn-id: trunk@37906 - --- components/synedit/synedit.pp | 4 +++- ide/editoroptions.pp | 5 +++-- ide/frames/editor_display_options.pas | 10 ++++++---- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/components/synedit/synedit.pp b/components/synedit/synedit.pp index 97c34ddd47..4bb406e7c2 100644 --- a/components/synedit/synedit.pp +++ b/components/synedit/synedit.pp @@ -7266,8 +7266,10 @@ begin end; fMarkupSpecialChar.Enabled := (eoShowSpecialChars in fOptions); - if (eoHideRightMargin in ChangedOptions) then + if (eoHideRightMargin in ChangedOptions) then begin FPaintArea.RightEdgeVisible := not(eoHideRightMargin in FOptions); + Invalidate; + end; (* Deal with deprecated Mouse values Those are all controlled by mouse-actions. diff --git a/ide/editoroptions.pp b/ide/editoroptions.pp index 341efb4e00..f6d18b753a 100644 --- a/ide/editoroptions.pp +++ b/ide/editoroptions.pp @@ -4711,10 +4711,11 @@ begin if FGutterSeparatorIndex <> -1 then ASynEdit.Gutter.SeparatorPart(0).Index := FGutterSeparatorIndex; + ASynEdit.RightEdge := fRightMargin; if fVisibleRightMargin then - ASynEdit.RightEdge := fRightMargin + ASynEdit.Options := ASynEdit.Options - [eoHideRightMargin] else - ASynEdit.RightEdge := 0; + ASynEdit.Options := ASynEdit.Options + [eoHideRightMargin]; ApplyFontSettingsTo(ASynEdit); //debugln(['TEditorOptions.GetSynEditSettings ',ASynEdit.font.height]); diff --git a/ide/frames/editor_display_options.pas b/ide/frames/editor_display_options.pas index 602a60608f..47b77ead0a 100644 --- a/ide/frames/editor_display_options.pas +++ b/ide/frames/editor_display_options.pas @@ -216,10 +216,11 @@ begin for a := Low(PreviewEdits) to High(PreviewEdits) do if PreviewEdits[a] <> nil then begin + PreviewEdits[a].RightEdge := NewVal; if VisibleRightMarginCheckBox.Checked then - PreviewEdits[a].RightEdge := NewVal + PreviewEdits[a].Options := PreviewEdits[a].Options - [eoHideRightMargin] else - PreviewEdits[a].RightEdge := 0; + PreviewEdits[a].Options := PreviewEdits[a].Options + [eoHideRightMargin]; end; end; end; @@ -269,10 +270,11 @@ begin if Separator.Visible then Separator.Index := GutterSeparatorIndexSpinBox.Value; end; + PreviewEdits[a].RightEdge := StrToIntDef(RightMarginComboBox.Text, 80); if VisibleRightMarginCheckBox.Checked then - PreviewEdits[a].RightEdge := StrToIntDef(RightMarginComboBox.Text, 80) + PreviewEdits[a].Options := PreviewEdits[a].Options - [eoHideRightMargin] else - PreviewEdits[a].RightEdge := 0; + PreviewEdits[a].Options := PreviewEdits[a].Options + [eoHideRightMargin]; if DisableAntialiasingCheckBox.Checked then PreviewEdits[a].Font.Quality := fqNonAntialiased else