From b3ff400cc8ddfbd1b5da54d6519a43bad6195f2a Mon Sep 17 00:00:00 2001 From: Don Ho Date: Tue, 5 Mar 2024 15:30:13 +0100 Subject: [PATCH] Fix python wrong decorator attribute colors Add "ATTRIBUTE" color in Python. Only DarkModeDefault.xml & Zenburn.xml are modified due to the other themes missing "DECORATOR" color with which "ATTRIBUTE" color uses. I let people who use those themes and need "DECORATOR" & "ATTRIBUTE" colors to modify them. Fix #5894, close #14830 --- PowerEditor/installer/themes/DarkModeDefault.xml | 1 + PowerEditor/installer/themes/Zenburn.xml | 1 + PowerEditor/src/ScintillaComponent/ScintillaEditView.h | 1 + PowerEditor/src/stylers.model.xml | 1 + 4 files changed, 4 insertions(+) diff --git a/PowerEditor/installer/themes/DarkModeDefault.xml b/PowerEditor/installer/themes/DarkModeDefault.xml index dcbc1dff5..182e1bbf6 100644 --- a/PowerEditor/installer/themes/DarkModeDefault.xml +++ b/PowerEditor/installer/themes/DarkModeDefault.xml @@ -1053,6 +1053,7 @@ License: GPL2 + diff --git a/PowerEditor/installer/themes/Zenburn.xml b/PowerEditor/installer/themes/Zenburn.xml index 41d8685ef..bd9cac801 100644 --- a/PowerEditor/installer/themes/Zenburn.xml +++ b/PowerEditor/installer/themes/Zenburn.xml @@ -1021,6 +1021,7 @@ License: GPL2 + diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.h b/PowerEditor/src/ScintillaComponent/ScintillaEditView.h index bd95a9904..8b59f74e3 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.h +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.h @@ -888,6 +888,7 @@ protected: setLexer(L_PYTHON, LIST_0 | LIST_1); execute(SCI_SETPROPERTY, reinterpret_cast("fold.quotes.python"), reinterpret_cast("1")); execute(SCI_SETPROPERTY, reinterpret_cast("lexer.python.decorator.attributes"), reinterpret_cast("1")); + execute(SCI_SETPROPERTY, reinterpret_cast("lexer.python.identifier.attributes"), reinterpret_cast("1")); }; void setGDScriptLexer() { diff --git a/PowerEditor/src/stylers.model.xml b/PowerEditor/src/stylers.model.xml index f2fe17f34..829622372 100644 --- a/PowerEditor/src/stylers.model.xml +++ b/PowerEditor/src/stylers.model.xml @@ -1029,6 +1029,7 @@ +