Skip to content

Commit

Permalink
Fix issue with classic theme's "orange" being olive vs. change histor…
Browse files Browse the repository at this point in the history
…y's modified markers.
  • Loading branch information
martijnlaan committed Jun 15, 2024
1 parent 62ffa99 commit a3ff13f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions Components/ModernColors.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Projects/Src/CompScintEdit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a3ff13f

Please sign in to comment.