Skip to content

Commit

Permalink
refac
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Oct 25, 2022
1 parent 570fa24 commit 97c086c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions app/formcolorsetup.pas
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ procedure TfmColorSetup.ListStylesDrawItem(Control: TWinControl; AIndex: Integer
var
C: TCanvas;
st: TecSyntaxFormat;
S: string;
NWidth: integer;
begin
if (AIndex<0) or (AIndex>=ListStyles.Items.Count) then exit;
Expand All @@ -289,9 +288,8 @@ procedure TfmColorSetup.ListStylesDrawItem(Control: TWinControl; AIndex: Integer
if st.BgColor=clNone then
C.Brush.Color:= FColorBg;

S:= cExample;
NWidth:= C.TextWidth(S);
C.TextOut(ARect.Right-NWidth, ARect.Top, S);
NWidth:= C.TextWidth(cExample);
C.TextOut(ARect.Right-NWidth, ARect.Top, cExample);

if st.BorderColorBottom<>clNone then
begin
Expand All @@ -307,10 +305,9 @@ procedure TfmColorSetup.ListStylesDrawItem(Control: TWinControl; AIndex: Integer
else
C.Brush.Color:= clWindow;

S:= ListStyles.Items[AIndex];
C.Font.Color:= clWindowText;
C.Font.Style:= [];
C.TextOut(ARect.Left+cIndent, ARect.Top, S);
C.TextOut(ARect.Left+cIndent, ARect.Top, ListStyles.Items[AIndex]);
end;

procedure TfmColorSetup.OKButtonClick(Sender: TObject);
Expand Down

0 comments on commit 97c086c

Please sign in to comment.