From 1fe61cc2daa1b5c56a9821fda3a4f350b8e660a9 Mon Sep 17 00:00:00 2001 From: Martijn Laan <1092369+martijnlaan@users.noreply.github.com> Date: Sun, 16 Jun 2024 09:05:37 +0200 Subject: [PATCH] The separate inactive back color doesn't work well at all because you 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. --- Components/ModernColors.pas | 13 ++++++------- Projects/Src/CompScintEdit.pas | 8 +++----- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Components/ModernColors.pas b/Components/ModernColors.pas index c8c7b0c7e..8c2de3cab 100644 --- a/Components/ModernColors.pas +++ b/Components/ModernColors.pas @@ -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, @@ -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 } @@ -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 } @@ -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; @@ -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 diff --git a/Projects/Src/CompScintEdit.pas b/Projects/Src/CompScintEdit.pas index e40395af9..9f028520c 100644 --- a/Projects/Src/CompScintEdit.pas +++ b/Projects/Src/CompScintEdit.pas @@ -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]);