Skip to content

Commit

Permalink
The separate inactive back color doesn't work well at all because you…
Browse files Browse the repository at this point in the history
… get it even if the IDE opens a dialog which includes the find dialog but that one stays open while finding leading to much confusion. Perhaps this is why Notepad++ doesnt use it either even though it closes its find dialog.
  • Loading branch information
martijnlaan committed Jun 16, 2024
1 parent 7795abe commit 1fe61cc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
13 changes: 6 additions & 7 deletions Components/ModernColors.pas
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface

type
TThemeType = (ttModernLight, ttModernDark, ttClassic);
TThemeColor = (tcFore, tcBack, tcToolBack, tcSelBack, tcSelInactiveBack,
TThemeColor = (tcFore, tcBack, tcToolBack, tcSelBack,
tcWordAtCursorOccurrenceBack, tcSelTextOccurrenceBack,
tcMarginFore, tcMarginBack, tcSplitterBack, tcBraceBack, tcIdentGuideFore,
tcRed, tcGreen, tcBlue, tcOrange, tcReallyOrange, tcPurple,
Expand Down Expand Up @@ -45,7 +45,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 }
//DSelInactiveBack = $51504F;{ VSCode Modern Dark }
DWACOBack = $4A4A4A; { VSCode Modern Dark }
DSTOBACK = $403A33; { VSCode Modern Dark }
DMarginFore = $716F71; { Monokai Pro }
Expand All @@ -59,7 +59,7 @@ function TTheme.FGetColor(Color: TThemeColor): TColor;
LBack = clWhite;
LToolBack = clBtnFace;
LSelBack = $FDD6A7; { VSCode Modern Light }
LSelInactiveBack = $F1EBE4;{ 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 }
Expand All @@ -72,7 +72,6 @@ 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;
Expand Down Expand Up @@ -104,9 +103,9 @@ function TTheme.FGetColor(Color: TThemeColor): TColor;
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, 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)
(LFore, LBack, LToolBack, LSelBack, LWACOBack, LSTOBack, LMarginFore, LMarginBack, LSplitterBack, LBraceBack, LIdentGuideFore, MRed, MGreen, MBlue, MOrange, MOrange, MPurple, MYellow, MTeal, MGray),
(DFore, DBack, DToolBack, DSelBack, DWACOBack, DSTOBack, DMarginFore, DMarginBack, DSplitterBack, DBraceBack, DIdentGuideFore, MRed, MGreen, MBlue, MOrange, MOrange, MPurple, MYellow, MTeal, MGray),
(CFore, CBack, CToolBack, CSelBack, CWACOBack, CSTOBack, CMarginFore, CMarginBack, CSplitterBack, CBraceBack, CIdentGuideFore, CRed, CGreen, CBlue, COrange, CReallyOrange, CPurple, CYellow, CTeal, CGray)
);

begin
Expand Down
8 changes: 3 additions & 5 deletions Projects/Src/CompScintEdit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,9 @@ procedure TCompScintEdit.UpdateThemeColorsAndStyleAttributes;
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_SETELEMENTCOLOUR, SC_ELEMENT_SELECTION_SECONDARY_BACK, SelBackColor);
Call(SCI_SETELEMENTCOLOUR, SC_ELEMENT_SELECTION_INACTIVE_BACK, SelBackColor);
Call(SCI_SETELEMENTCOLOUR, SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK, SelBackColor);

Call(SCI_INDICSETFORE, inSquiggly, FTheme.Colors[tcRed]);
Call(SCI_INDICSETFORE, inWordAtCursorOccurrence, FTheme.Colors[tcWordAtCursorOccurrenceBack]);
Expand Down

0 comments on commit 1fe61cc

Please sign in to comment.