diff --git a/Components/ModernColors.pas b/Components/ModernColors.pas index e8c502ee5..1a80d18cd 100644 --- a/Components/ModernColors.pas +++ b/Components/ModernColors.pas @@ -16,7 +16,7 @@ interface type TThemeType = (ttModernLight, ttModernDark, ttClassic); - TThemeColor = (tcFore, tcBack, tcToolBack, tcSelBack, + TThemeColor = (tcFore, tcBack, tcToolBack, tcSelBack, tcSelInactiveBack, tcWordAtCursorOccurrenceBack, tcSelTextOccurrenceBack, tcMarginFore, tcMarginBack, tcSplitterBack, tcBraceBack, tcIdentGuideFore, tcRed, tcGreen, tcBlue, tcOrange, tcPurple, tcYellow, tcTeal, tcGray); @@ -44,6 +44,7 @@ function TTheme.FGetColor(Color: TThemeColor): TColor; DBack = $1F1F1F; { VSCode Modern Dark } DToolBack = $413E40; { Monokai Pro } DSelBack = $764F1D; { VSCode Modern Dark } + DSelInactiveBack = $51504F;{ VSCode Modern Dark } DWACOBack = $4A4A4A; { VSCode Modern Dark } DSTOBACK = $403A33; { VSCode Modern Dark } DMarginFore = $716F71; { Monokai Pro } @@ -57,6 +58,7 @@ function TTheme.FGetColor(Color: TThemeColor): TColor; LBack = clWhite; LToolBack = clBtnFace; LSelBack = $FDD6A7; { VSCode Modern Light } + LSelInactiveBack = $F1EBE4;{ VSCode Modern Light } LWACOBack = $ECECEC; { Inno Setup 5, 4 tints lightened using color-hex.com } LSTOBACK = $FEEAD3; { VSCode Modern Light } LMarginFore = $716F71; { Monokai Pro } @@ -69,6 +71,7 @@ function TTheme.FGetColor(Color: TThemeColor): TColor; CBack = clWhite; CToolBack = clBtnFace; CSelBack = $FDD6A7; { VSCode Modern Light } + CSelInactiveBack = $F1EBE4;{ VSCode Modern Light } CWACOBack = $ECECEC; { Inno Setup 5, 4 tints lightened using color-hex.com } CSTOBACK = $FEEAD3; { VSCode Modern Light } CMarginFore = clWindowText; @@ -99,9 +102,9 @@ function TTheme.FGetColor(Color: TThemeColor): TColor; CGray = $707070; { Inno Setup 5 } Colors: array [TThemeType, TThemeColor] of TColor = ( - (LFore, LBack, LToolBack, LSelBack, LWACOBack, LSTOBack, LMarginFore, LMarginBack, LSplitterBack, LBraceBack, LIdentGuideFore, MRed, MGreen, MBlue, MOrange, MPurple, MYellow, MTeal, MGray), - (DFore, DBack, DToolBack, DSelBack, DWACOBack, DSTOBack, DMarginFore, DMarginBack, DSplitterBack, DBraceBack, DIdentGuideFore, MRed, MGreen, MBlue, MOrange, MPurple, MYellow, MTeal, MGray), - (CFore, CBack, CToolBack, CSelBack, 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, 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) ); begin diff --git a/Projects/Src/CompScintEdit.pas b/Projects/Src/CompScintEdit.pas index 28669b1de..d8314d2b4 100644 --- a/Projects/Src/CompScintEdit.pas +++ b/Projects/Src/CompScintEdit.pas @@ -290,11 +290,22 @@ procedure TCompScintEdit.UpdateThemeColorsAndStyleAttributes; if FTheme <> nil then begin Font.Color := FTheme.Colors[tcFore]; Color := FTheme.Colors[tcBack]; - Call(SCI_SETSELBACK, 1, FTheme.Colors[tcSelBack]); + + var SelBackColor := FTheme.Colors[tcSelBack]; + Call(SCI_SETELEMENTCOLOUR, SC_ELEMENT_SELECTION_BACK, SelBackColor); + Call(SCI_SETELEMENTCOLOUR, SC_ELEMENT_SELECTION_ADDITIONAL_BACK, SelBackColor); + + var SelInactiveBackColor := FTheme.Colors[tcSelInactiveBack]; + Call(SCI_SETELEMENTCOLOUR, SC_ELEMENT_SELECTION_SECONDARY_BACK, SelInactiveBackColor); + Call(SCI_SETELEMENTCOLOUR, SC_ELEMENT_SELECTION_INACTIVE_BACK, SelInactiveBackColor); + Call(SCI_SETELEMENTCOLOUR, SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK, SelInactiveBackColor); + Call(SCI_INDICSETFORE, inSquiggly, FTheme.Colors[tcRed]); Call(SCI_INDICSETFORE, inWordAtCursorOccurrence, FTheme.Colors[tcWordAtCursorOccurrenceBack]); Call(SCI_INDICSETFORE, inSelTextOccurrence, FTheme.Colors[tcSelTextOccurrenceBack]); + Call(SCI_MARKERSETBACK, mmLineStep, FTheme.Colors[tcBlue]); + Call(SCI_MARKERSETFORE, SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN, FTheme.Colors[tcBlue]); { To reproduce: open a file, press enter, save, undo } Call(SCI_MARKERSETBACK, SC_MARKNUM_HISTORY_REVERTED_TO_ORIGIN, FTheme.Colors[tcBlue]); Call(SCI_MARKERSETFORE, SC_MARKNUM_HISTORY_SAVED, FTheme.Colors[tcGreen]);