From 848b412cf7179bb157bfd2d2a97a421ade5dd90f Mon Sep 17 00:00:00 2001 From: Don Ho Date: Thu, 22 Sep 2022 19:28:08 +0200 Subject: [PATCH] Fix Change History margin visual glichy under dark mode Ref: https://community.notepad-plus-plus.org/topic/23510/notepad-v8-4-6-release-candidate/2?_=1663857801779 --- PowerEditor/installer/themes/Bespin.xml | 1 + PowerEditor/installer/themes/Black board.xml | 1 + PowerEditor/installer/themes/Choco.xml | 1 + PowerEditor/installer/themes/DansLeRuSH-Dark.xml | 1 + PowerEditor/installer/themes/DarkModeDefault.xml | 1 + PowerEditor/installer/themes/Deep Black.xml | 1 + PowerEditor/installer/themes/Hello Kitty.xml | 1 + PowerEditor/installer/themes/HotFudgeSundae.xml | 1 + PowerEditor/installer/themes/Mono Industrial.xml | 1 + PowerEditor/installer/themes/Monokai.xml | 1 + PowerEditor/installer/themes/MossyLawn.xml | 1 + PowerEditor/installer/themes/Navajo.xml | 1 + PowerEditor/installer/themes/Obsidian.xml | 1 + PowerEditor/installer/themes/Plastic Code Wrap.xml | 1 + PowerEditor/installer/themes/Ruby Blue.xml | 1 + PowerEditor/installer/themes/Solarized-light.xml | 1 + PowerEditor/installer/themes/Solarized.xml | 1 + PowerEditor/installer/themes/Twilight.xml | 1 + PowerEditor/installer/themes/Vibrant Ink.xml | 1 + PowerEditor/installer/themes/Zenburn.xml | 1 + PowerEditor/installer/themes/khaki.xml | 1 + PowerEditor/installer/themes/vim Dark Blue.xml | 1 + PowerEditor/src/Parameters.cpp | 11 ----------- .../src/ScintillaComponent/ScintillaEditView.cpp | 6 ++---- 24 files changed, 24 insertions(+), 15 deletions(-) diff --git a/PowerEditor/installer/themes/Bespin.xml b/PowerEditor/installer/themes/Bespin.xml index b0f55848e..eb56ce930 100644 --- a/PowerEditor/installer/themes/Bespin.xml +++ b/PowerEditor/installer/themes/Bespin.xml @@ -784,6 +784,7 @@ Credits: + diff --git a/PowerEditor/installer/themes/Black board.xml b/PowerEditor/installer/themes/Black board.xml index 7995b12ac..0b4bd0987 100644 --- a/PowerEditor/installer/themes/Black board.xml +++ b/PowerEditor/installer/themes/Black board.xml @@ -782,6 +782,7 @@ Credits: + diff --git a/PowerEditor/installer/themes/Choco.xml b/PowerEditor/installer/themes/Choco.xml index 9a1ea3013..6f30f1cdc 100644 --- a/PowerEditor/installer/themes/Choco.xml +++ b/PowerEditor/installer/themes/Choco.xml @@ -782,6 +782,7 @@ Credits: + diff --git a/PowerEditor/installer/themes/DansLeRuSH-Dark.xml b/PowerEditor/installer/themes/DansLeRuSH-Dark.xml index 44827dec8..1e41093d6 100644 --- a/PowerEditor/installer/themes/DansLeRuSH-Dark.xml +++ b/PowerEditor/installer/themes/DansLeRuSH-Dark.xml @@ -894,6 +894,7 @@ Installation : Copy this file to "%APPDATA%\Notepad++\themes" and in a portable + diff --git a/PowerEditor/installer/themes/DarkModeDefault.xml b/PowerEditor/installer/themes/DarkModeDefault.xml index c3d7547a3..acfa7351f 100644 --- a/PowerEditor/installer/themes/DarkModeDefault.xml +++ b/PowerEditor/installer/themes/DarkModeDefault.xml @@ -1424,6 +1424,7 @@ License: GPL2 + diff --git a/PowerEditor/installer/themes/Deep Black.xml b/PowerEditor/installer/themes/Deep Black.xml index a4dc4b9d2..15672637b 100644 --- a/PowerEditor/installer/themes/Deep Black.xml +++ b/PowerEditor/installer/themes/Deep Black.xml @@ -786,6 +786,7 @@ https://notepad-plus-plus.org/donate/ + diff --git a/PowerEditor/installer/themes/Hello Kitty.xml b/PowerEditor/installer/themes/Hello Kitty.xml index f97987afc..eb1c4d93b 100644 --- a/PowerEditor/installer/themes/Hello Kitty.xml +++ b/PowerEditor/installer/themes/Hello Kitty.xml @@ -757,6 +757,7 @@ so your enhanced file can be included in Notepad++ future release. + diff --git a/PowerEditor/installer/themes/HotFudgeSundae.xml b/PowerEditor/installer/themes/HotFudgeSundae.xml index c8ace37c2..43eb5d625 100644 --- a/PowerEditor/installer/themes/HotFudgeSundae.xml +++ b/PowerEditor/installer/themes/HotFudgeSundae.xml @@ -920,6 +920,7 @@ Installation: + diff --git a/PowerEditor/installer/themes/Mono Industrial.xml b/PowerEditor/installer/themes/Mono Industrial.xml index ec2bfa4c9..6ba451ac3 100644 --- a/PowerEditor/installer/themes/Mono Industrial.xml +++ b/PowerEditor/installer/themes/Mono Industrial.xml @@ -786,6 +786,7 @@ Credits: + diff --git a/PowerEditor/installer/themes/Monokai.xml b/PowerEditor/installer/themes/Monokai.xml index fe68f6a3c..891967b62 100644 --- a/PowerEditor/installer/themes/Monokai.xml +++ b/PowerEditor/installer/themes/Monokai.xml @@ -802,6 +802,7 @@ Credits: + diff --git a/PowerEditor/installer/themes/MossyLawn.xml b/PowerEditor/installer/themes/MossyLawn.xml index cc8f43ebb..073fe501d 100644 --- a/PowerEditor/installer/themes/MossyLawn.xml +++ b/PowerEditor/installer/themes/MossyLawn.xml @@ -921,6 +921,7 @@ Installation: + diff --git a/PowerEditor/installer/themes/Navajo.xml b/PowerEditor/installer/themes/Navajo.xml index 9d8091957..aab60e1c7 100644 --- a/PowerEditor/installer/themes/Navajo.xml +++ b/PowerEditor/installer/themes/Navajo.xml @@ -918,6 +918,7 @@ Installation: + diff --git a/PowerEditor/installer/themes/Obsidian.xml b/PowerEditor/installer/themes/Obsidian.xml index c641e3058..492d5265e 100644 --- a/PowerEditor/installer/themes/Obsidian.xml +++ b/PowerEditor/installer/themes/Obsidian.xml @@ -787,6 +787,7 @@ Notepad++ Custom Style + diff --git a/PowerEditor/installer/themes/Plastic Code Wrap.xml b/PowerEditor/installer/themes/Plastic Code Wrap.xml index 08c1c571e..81b02bd8a 100644 --- a/PowerEditor/installer/themes/Plastic Code Wrap.xml +++ b/PowerEditor/installer/themes/Plastic Code Wrap.xml @@ -798,6 +798,7 @@ Credits: + diff --git a/PowerEditor/installer/themes/Ruby Blue.xml b/PowerEditor/installer/themes/Ruby Blue.xml index a7325e178..b1e2a11bf 100644 --- a/PowerEditor/installer/themes/Ruby Blue.xml +++ b/PowerEditor/installer/themes/Ruby Blue.xml @@ -635,6 +635,7 @@ http://sourceforge.net/donate/index.php?group_id=95717 + diff --git a/PowerEditor/installer/themes/Solarized-light.xml b/PowerEditor/installer/themes/Solarized-light.xml index c356be747..e79f7176f 100644 --- a/PowerEditor/installer/themes/Solarized-light.xml +++ b/PowerEditor/installer/themes/Solarized-light.xml @@ -929,6 +929,7 @@ Installation: + diff --git a/PowerEditor/installer/themes/Solarized.xml b/PowerEditor/installer/themes/Solarized.xml index e8a9cc19b..d5ec813db 100644 --- a/PowerEditor/installer/themes/Solarized.xml +++ b/PowerEditor/installer/themes/Solarized.xml @@ -929,6 +929,7 @@ Installation: + diff --git a/PowerEditor/installer/themes/Twilight.xml b/PowerEditor/installer/themes/Twilight.xml index 0581f033b..cd3eac8c0 100644 --- a/PowerEditor/installer/themes/Twilight.xml +++ b/PowerEditor/installer/themes/Twilight.xml @@ -787,6 +787,7 @@ Credits: + diff --git a/PowerEditor/installer/themes/Vibrant Ink.xml b/PowerEditor/installer/themes/Vibrant Ink.xml index 29077ea44..d857e2e1f 100644 --- a/PowerEditor/installer/themes/Vibrant Ink.xml +++ b/PowerEditor/installer/themes/Vibrant Ink.xml @@ -758,6 +758,7 @@ http://sourceforge.net/donate/index.php?group_id=95717 + diff --git a/PowerEditor/installer/themes/Zenburn.xml b/PowerEditor/installer/themes/Zenburn.xml index 9f2b04e51..42b6b5604 100644 --- a/PowerEditor/installer/themes/Zenburn.xml +++ b/PowerEditor/installer/themes/Zenburn.xml @@ -1424,6 +1424,7 @@ License: GPL2 + diff --git a/PowerEditor/installer/themes/khaki.xml b/PowerEditor/installer/themes/khaki.xml index 989b31014..34fd9bb57 100644 --- a/PowerEditor/installer/themes/khaki.xml +++ b/PowerEditor/installer/themes/khaki.xml @@ -918,6 +918,7 @@ Installation: + diff --git a/PowerEditor/installer/themes/vim Dark Blue.xml b/PowerEditor/installer/themes/vim Dark Blue.xml index d9f6ae5ac..66343cee9 100644 --- a/PowerEditor/installer/themes/vim Dark Blue.xml +++ b/PowerEditor/installer/themes/vim Dark Blue.xml @@ -750,6 +750,7 @@ + diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 29a0804fe..c7ef92854 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -3644,17 +3644,6 @@ bool NppParameters::feedStylerArray(TiXmlNode *node) _widgetStyleArray.addStyler(0, eolColorkNode); } - pStyle = _widgetStyleArray.findByName(TEXT("Change History margin")); - if (!pStyle) - { - TiXmlNode* changeHistoryNode = globalStyleRoot->InsertEndChild(TiXmlElement(TEXT("WidgetStyle"))); - changeHistoryNode->ToElement()->SetAttribute(TEXT("name"), TEXT("Change History margin")); - changeHistoryNode->ToElement()->SetAttribute(TEXT("styleID"), TEXT("0")); - changeHistoryNode->ToElement()->SetAttribute(TEXT("bgColor"), TEXT("E0E0E0")); - - _widgetStyleArray.addStyler(0, changeHistoryNode); - } - return true; } diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index b0dad15b9..8d3915486 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -2741,14 +2741,12 @@ void ScintillaEditView::performGlobalStyles() execute(SCI_SETMARGINTYPEN, _SC_MARGE_SYMBOL, SC_MARGIN_COLOUR); execute(SCI_SETMARGINBACKN, _SC_MARGE_SYMBOL, bookmarkMarginColor); - COLORREF changeHistoryMarginColor = veryLiteGrey; pStyle = stylers.findByName(TEXT("Change History margin")); if (pStyle) { - changeHistoryMarginColor = pStyle->_bgColor; + execute(SCI_SETMARGINTYPEN, _SC_MARGE_CHANGEHISTORY, SC_MARGIN_COLOUR); + execute(SCI_SETMARGINBACKN, _SC_MARGE_CHANGEHISTORY, pStyle->_bgColor); } - execute(SCI_SETMARGINTYPEN, _SC_MARGE_CHANGEHISTORY, SC_MARGIN_COLOUR); - execute(SCI_SETMARGINBACKN, _SC_MARGE_CHANGEHISTORY, changeHistoryMarginColor); COLORREF urlHoveredFG = grey; pStyle = stylers.findByName(TEXT("URL hovered"));