IDE-Options / SynEdit: Fixed RightEdge visibility

git-svn-id: trunk@37906 -
This commit is contained in:
martin 2012-07-11 02:01:46 +00:00
parent 2eff3271c7
commit c65916bcaf
3 changed files with 12 additions and 7 deletions

View File

@ -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.

View File

@ -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]);

View File

@ -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