Skip to content

Commit

Permalink
Issue #139: minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarbecker committed Apr 29, 2024
1 parent f49804a commit 604047f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/main.pas
Expand Up @@ -10972,9 +10972,9 @@ procedure TMainForm.AnyGridBeforeCellPaint(Sender: TBaseVirtualTree;
clOdd := AppSettings.ReadInt(asRowBackgroundOdd);
isEven := Node.Index mod 2 = 0;
if IsEven and (clEven <> clNone) then
cl := AppSettings.ReadInt(asRowBackgroundEven)
cl := clEven
else if (not IsEven) and (clOdd <> clNone) then
cl := AppSettings.ReadInt(asRowBackgroundOdd)
cl := clOdd
else
cl := clNone;

Expand Down
4 changes: 2 additions & 2 deletions source/table_editor.pas
Expand Up @@ -1103,9 +1103,9 @@ procedure TfrmTableEditor.listColumnsBeforeCellPaint(Sender: TBaseVirtualTree;
clOdd := AppSettings.ReadInt(asRowBackgroundOdd);
isEven := Node.Index mod 2 = 0;
if IsEven and (clEven <> clNone) then
BgColor := AppSettings.ReadInt(asRowBackgroundEven)
BgColor := clEven
else if (not IsEven) and (clOdd <> clNone) then
BgColor := AppSettings.ReadInt(asRowBackgroundOdd);
BgColor := clOdd;

// Darken cell background to signalize it doesn't allow length/set
// Exclude non editable checkbox columns - grey looks ugly there.
Expand Down

0 comments on commit 604047f

Please sign in to comment.