From a3ff13f4c10d34d4b078837d45c0d0ca69483844 Mon Sep 17 00:00:00 2001 From: Martijn Laan <1092369+martijnlaan@users.noreply.github.com> Date: Sat, 15 Jun 2024 02:19:53 +0200 Subject: [PATCH] Fix issue with classic theme's "orange" being olive vs. change history's modified markers. --- Components/ModernColors.pas | 10 ++++++---- Projects/Src/CompScintEdit.pas | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Components/ModernColors.pas b/Components/ModernColors.pas index 1a80d18cd..c8c7b0c7e 100644 --- a/Components/ModernColors.pas +++ b/Components/ModernColors.pas @@ -19,7 +19,8 @@ interface TThemeColor = (tcFore, tcBack, tcToolBack, tcSelBack, tcSelInactiveBack, tcWordAtCursorOccurrenceBack, tcSelTextOccurrenceBack, tcMarginFore, tcMarginBack, tcSplitterBack, tcBraceBack, tcIdentGuideFore, - tcRed, tcGreen, tcBlue, tcOrange, tcPurple, tcYellow, tcTeal, tcGray); + tcRed, tcGreen, tcBlue, tcOrange, tcReallyOrange, tcPurple, + tcYellow, tcTeal, tcGray); TTheme = class private @@ -96,15 +97,16 @@ function TTheme.FGetColor(Color: TThemeColor): TColor; CGreen = clGreen; CBlue = clBlue; COrange = clOlive; + CReallyOrange = $00A5FF; CPurple = $C00080; { Inno Setup 5 } CYellow = clYellow; CTeal = clTeal; CGray = $707070; { Inno Setup 5 } Colors: array [TThemeType, TThemeColor] of TColor = ( - (LFore, LBack, LToolBack, LSelBack, LSelInactiveBack, LWACOBack, LSTOBack, LMarginFore, LMarginBack, LSplitterBack, LBraceBack, LIdentGuideFore, MRed, MGreen, MBlue, MOrange, MPurple, MYellow, MTeal, MGray), - (DFore, DBack, DToolBack, DSelBack, DSelInactiveBack, DWACOBack, DSTOBack, DMarginFore, DMarginBack, DSplitterBack, DBraceBack, DIdentGuideFore, MRed, MGreen, MBlue, MOrange, MPurple, MYellow, MTeal, MGray), - (CFore, CBack, CToolBack, CSelBack, CSelInactiveBack, CWACOBack, CSTOBack, CMarginFore, CMarginBack, CSplitterBack, CBraceBack, CIdentGuideFore, CRed, CGreen, CBlue, COrange, CPurple, CYellow, CTeal, CGray) + (LFore, LBack, LToolBack, LSelBack, LSelInactiveBack, LWACOBack, LSTOBack, LMarginFore, LMarginBack, LSplitterBack, LBraceBack, LIdentGuideFore, MRed, MGreen, MBlue, MOrange, MOrange, MPurple, MYellow, MTeal, MGray), + (DFore, DBack, DToolBack, DSelBack, DSelInactiveBack, DWACOBack, DSTOBack, DMarginFore, DMarginBack, DSplitterBack, DBraceBack, DIdentGuideFore, MRed, MGreen, MBlue, MOrange, MOrange, MPurple, MYellow, MTeal, MGray), + (CFore, CBack, CToolBack, CSelBack, CSelInactiveBack, CWACOBack, CSTOBack, CMarginFore, CMarginBack, CSplitterBack, CBraceBack, CIdentGuideFore, CRed, CGreen, CBlue, COrange, CReallyOrange, CPurple, CYellow, CTeal, CGray) ); begin diff --git a/Projects/Src/CompScintEdit.pas b/Projects/Src/CompScintEdit.pas index d8314d2b4..45d368f6f 100644 --- a/Projects/Src/CompScintEdit.pas +++ b/Projects/Src/CompScintEdit.pas @@ -310,8 +310,8 @@ procedure TCompScintEdit.UpdateThemeColorsAndStyleAttributes; Call(SCI_MARKERSETBACK, SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN, FTheme.Colors[tcBlue]); Call(SCI_MARKERSETFORE, SC_MARKNUM_HISTORY_SAVED, FTheme.Colors[tcGreen]); Call(SCI_MARKERSETBACK, SC_MARKNUM_HISTORY_SAVED, FTheme.Colors[tcGreen]); - Call(SCI_MARKERSETFORE, SC_MARKNUM_HISTORY_MODIFIED, FTheme.Colors[tcOrange]); - Call(SCI_MARKERSETBACK, SC_MARKNUM_HISTORY_MODIFIED, FTheme.Colors[tcOrange]); + Call(SCI_MARKERSETFORE, SC_MARKNUM_HISTORY_MODIFIED, FTheme.Colors[tcReallyOrange]); + Call(SCI_MARKERSETBACK, SC_MARKNUM_HISTORY_MODIFIED, FTheme.Colors[tcReallyOrange]); Call(SCI_MARKERSETFORE, SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED, FTheme.Colors[tcTeal]); { To reproduce: ??? - sometimes get it but not sure how to do this with minimal steps } Call(SCI_MARKERSETBACK, SC_MARKNUM_HISTORY_REVERTED_TO_MODIFIED, FTheme.Colors[tcTeal]); end;