Skip to content

Commit cc5b811

Browse files
committed
fix: font bold + italic setting not stored in settings
Closes #2398
1 parent da07591 commit cc5b811

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/preferences.pas

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,7 @@ procedure TfrmPreferences.SQLFontChange(Sender: TObject);
750750
AttriIdx: Integer;
751751
Attri: TSynHighlighterAttributes;
752752
Foreground, Background: TColor;
753+
FontStyle: Integer;
753754
begin
754755
if comboSQLFontName.ItemIndex > -1 then
755756
SynMemoSQLSample.Font.Name := comboSQLFontName.Items[comboSQLFontName.ItemIndex];
@@ -772,9 +773,12 @@ procedure TfrmPreferences.SQLFontChange(Sender: TObject);
772773
else Attri.Style := Attri.Style - [fsBold];
773774
if chkSQLItalic.Checked then Attri.Style := Attri.Style + [fsItalic]
774775
else Attri.Style := Attri.Style - [fsItalic];
776+
FontStyle := Attri.IntegerStyle;
777+
// Write attribute settings to in-memory color scheme
775778
Attri := FAppColorScheme.SynSqlSyn.Attribute[AttriIdx];
776779
Attri.Foreground := Foreground;
777780
Attri.Background := Background;
781+
Attri.IntegerStyle := FontStyle;
778782
end;
779783
Modified(Sender);
780784
end;

0 commit comments

Comments
 (0)