From 604047f8d666953837743168e7bb2e6480edc636 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 29 Apr 2024 12:08:24 +0200 Subject: [PATCH] Issue #139: minor optimization --- source/main.pas | 4 ++-- source/table_editor.pas | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/main.pas b/source/main.pas index 85310264..c594e490 100644 --- a/source/main.pas +++ b/source/main.pas @@ -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; diff --git a/source/table_editor.pas b/source/table_editor.pas index c3257f87..5cb74d23 100644 --- a/source/table_editor.pas +++ b/source/table_editor.pas @@ -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.