+add: factory dark mode settings (part II)

This commit is contained in:
Rainer Kottenhoff 2021-07-08 08:31:28 +02:00
parent b57f52e91a
commit 60d4fc63c2
34 changed files with 138 additions and 199 deletions

View File

@ -552,9 +552,8 @@
#define IDS_USE_LOCALE_DATEFMT 34700
#define IDS_MUI_MENU_THEMES 37000
#define IDM_THEMES_DEFAULT 37001
#define IDM_THEMES_RESOURCES 37002
#define IDM_THEMES_FILE_ITEM 37003
#define IDM_THEMES_FACTORY_RESET 37001
#define IDM_THEMES_STD_CFG 37002
/// !!! dont use IDs until ...37100
#define IDM_FILE_NEW 40000

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Taal"
IDS_USE_LOCALE_DATEFMT "Taal Definieer &Datumformaat"
IDS_MUI_MENU_THEMES "&Skema-versameling"
IDM_THEMES_DEFAULT "&Fabriek Verstek"
IDM_THEMES_FILE_ITEM "&Standaard"
IDM_THEMES_FACTORY_RESET "&Fabriek Verstek"
IDM_THEMES_STD_CFG "&Standaard"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Maak alles skoon"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Мова"
IDS_USE_LOCALE_DATEFMT "Мова вызначае &фармат даты"
IDS_MUI_MENU_THEMES "&Калекцыя схем"
IDM_THEMES_DEFAULT "&Завадскія налады"
IDM_THEMES_FILE_ITEM "&Стандартная"
IDM_THEMES_FACTORY_RESET "&Завадскія налады"
IDM_THEMES_STD_CFG "&Стандартная"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Ачысціць усё"

View File

@ -257,9 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Sprache"
IDS_USE_LOCALE_DATEFMT "Sprache bestimmt &Datumsformat"
IDS_MUI_MENU_THEMES "&Schema Sammlung"
IDM_THEMES_DEFAULT "&Fabrik Schema Hell"
IDM_THEMES_RESOURCES "Fabrik Schema &Dunkel"
IDM_THEMES_FILE_ITEM "&Standard Schema"
IDM_THEMES_FACTORY_RESET "&Zurücksetzen auf Fabrik Schema"
IDM_THEMES_STD_CFG "&Standard Config Schema"
IDS_MUI_STATUSBAR_PREFIXES "Z ,Sp ,Sel ,GrB ,SelZ ,Vork ,,,,,,,Zch ,Ersz ,Ergb ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Alle löschen"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Γλώσσα"
IDS_USE_LOCALE_DATEFMT "Μορφή &ημερομηνίας βάσει γλώσσας"
IDS_MUI_MENU_THEMES "&Συλλογή συνδυασμών"
IDM_THEMES_DEFAULT "&Προεπιλεγμένη"
IDM_THEMES_FILE_ITEM "&Τυπική"
IDM_THEMES_FACTORY_RESET "&Προεπιλεγμένη"
IDM_THEMES_STD_CFG "&Τυπική"
IDS_MUI_STATUSBAR_PREFIXES "Γρ. ,Στήλη ,Επιλ. ,Επιλb ,ΕπιλΓρ. ,Εμφ. ,,,,,,,Χαρ. ,Αντικ. ,Βαθμ. ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Απαλοιφή όλων"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Language"
IDS_USE_LOCALE_DATEFMT "Language defines &Date Format"
IDS_MUI_MENU_THEMES "&Scheme Collection"
IDM_THEMES_DEFAULT "&Factory Default"
IDM_THEMES_FILE_ITEM "&Standard"
IDM_THEMES_FACTORY_RESET "&Factory Reset"
IDM_THEMES_STD_CFG "&Standard"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Clear All"

View File

@ -257,9 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Language"
IDS_USE_LOCALE_DATEFMT "Language defines &Date Format"
IDS_MUI_MENU_THEMES "&Scheme Collection"
IDM_THEMES_DEFAULT "&Factory Scheme Light"
IDM_THEMES_RESOURCES "&Factory Scheme Dark"
IDM_THEMES_FILE_ITEM "&Standard Scheme"
IDM_THEMES_FACTORY_RESET "&Factory Reset"
IDM_THEMES_STD_CFG "&Standard Config"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Clear All"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Idioma"
IDS_USE_LOCALE_DATEFMT "Idioma &define Formato Fecha"
IDS_MUI_MENU_THEMES "&Colección de Esquemas"
IDM_THEMES_DEFAULT "&Defecto de fábrica"
IDM_THEMES_FILE_ITEM "&Estándar"
IDM_THEMES_FACTORY_RESET "&Defecto de fábrica"
IDM_THEMES_STD_CFG "&Estándar"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Borrar todo"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Idioma"
IDS_USE_LOCALE_DATEFMT "Idioma &define Formato Fecha"
IDS_MUI_MENU_THEMES "&Colección de Esquemas"
IDM_THEMES_DEFAULT "&Defecto de fábrica"
IDM_THEMES_FILE_ITEM "&Estándar"
IDM_THEMES_FACTORY_RESET "&Defecto de fábrica"
IDM_THEMES_STD_CFG "&Estándar"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Borrar todo"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Langue"
IDS_USE_LOCALE_DATEFMT "Langue définit Format &Date"
IDS_MUI_MENU_THEMES "&Collection de Modèles"
IDM_THEMES_DEFAULT "Par &Défaut"
IDM_THEMES_FILE_ITEM "&Standard"
IDM_THEMES_FACTORY_RESET "Par &Défaut"
IDM_THEMES_STD_CFG "&Standard"
IDS_MUI_STATUSBAR_PREFIXES "Lgn ,Col ,Sel ,Sb ,SLgn ,Occ ,,,,,,,Car ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Effacer tout"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "भाषा (&L)"
IDS_USE_LOCALE_DATEFMT "दिनांक प्रारूप को भाषा अनुसार स्थापित करें (&D)"
IDS_MUI_MENU_THEMES "स्कीम संग्रह (&S)"
IDM_THEMES_DEFAULT "फैक्ट्री डिफ़ॉल्ट (&F)"
IDM_THEMES_FILE_ITEM "सामान्य (&S)"
IDM_THEMES_FACTORY_RESET "फैक्ट्री डिफ़ॉल्ट (&F)"
IDM_THEMES_STD_CFG "सामान्य (&S)"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "सारा साफ करें"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "N&yelv"
IDS_USE_LOCALE_DATEFMT "Nyelvi beállítás szerinti &Dátumformátum"
IDS_MUI_MENU_THEMES "&Sablon gyűjtemény"
IDM_THEMES_DEFAULT "&Gyári érték"
IDM_THEMES_FILE_ITEM "&Standard"
IDM_THEMES_FACTORY_RESET "&Gyári érték"
IDM_THEMES_STD_CFG "&Standard Config"
IDS_MUI_STATUSBAR_PREFIXES "Sor ,Oszl ,Kij ,Sb ,SKij ,Tal ,,,,,,,Ch ,Csere ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Mind törlése"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Language"
IDS_USE_LOCALE_DATEFMT "Language defines &Date Format"
IDS_MUI_MENU_THEMES "&Scheme Collection"
IDM_THEMES_DEFAULT "&Factory Default"
IDM_THEMES_FILE_ITEM "&Standard"
IDM_THEMES_FACTORY_RESET "&Factory Default"
IDM_THEMES_STD_CFG "&Standard Config"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Clear All"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Lingua"
IDS_USE_LOCALE_DATEFMT "La lingua define il Formato &Data"
IDS_MUI_MENU_THEMES "&Collezione di Schemi"
IDM_THEMES_DEFAULT "Impostazioni di &fabbrica"
IDM_THEMES_FILE_ITEM "&Standard"
IDM_THEMES_FACTORY_RESET "Impostazioni di &fabbrica"
IDM_THEMES_STD_CFG "&Standard Config"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Pulisci tutto"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "言語(&L)"
IDS_USE_LOCALE_DATEFMT "言語を日付の書式に反映(&D)"
IDS_MUI_MENU_THEMES "配色テーマ(&S)"
IDM_THEMES_DEFAULT "初期設定(&F)"
IDM_THEMES_FILE_ITEM "標準 (&S)" // Keep blank space before (&S)
IDM_THEMES_FACTORY_RESET "初期設定(&F)"
IDM_THEMES_STD_CFG "標準 (&S)" // Keep blank space before (&S)
IDS_MUI_STATUSBAR_PREFIXES "行 ,列 ,選 ,選B ,選行 ,見 ,,,,,,,字 ,置 ,式 ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "すべて削除"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "언어(&L)"
IDS_USE_LOCALE_DATEFMT "언어가 날짜 형식 정의(&D)"
IDS_MUI_MENU_THEMES "구성표 모음(&S)"
IDM_THEMES_DEFAULT "기본값(&F)"
IDM_THEMES_FILE_ITEM "표준 (&S)" // 앞에 공백을 유지(&S)
IDM_THEMES_FACTORY_RESET "기본값(&F)"
IDM_THEMES_STD_CFG "표준 (&S)" // 앞에 공백을 유지(&S)
IDS_MUI_STATUSBAR_PREFIXES "줄 ,열 ,선택 ,블럭 ,줄선택 ,일치 ,,,,,,,글자 ,교체 ,유형 ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "모두 지우기"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Taal"
IDS_USE_LOCALE_DATEFMT "Taal definieert &Datumformaat"
IDS_MUI_MENU_THEMES "&Schema Collectie"
IDM_THEMES_DEFAULT "&Fabrieksinstelling"
IDM_THEMES_FILE_ITEM "&Standaard"
IDM_THEMES_FACTORY_RESET "&Fabrieksinstelling"
IDM_THEMES_STD_CFG "&Standaard"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Wis alles"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Język"
IDS_USE_LOCALE_DATEFMT "Język definiuje Format &Daty"
IDS_MUI_MENU_THEMES "Wybór &schematów"
IDM_THEMES_DEFAULT "&Domyślne"
IDM_THEMES_FILE_ITEM "&Standardowe"
IDM_THEMES_FACTORY_RESET "&Domyślne"
IDM_THEMES_STD_CFG "&Standardowe"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,kol ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Podn ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Wyczyść wszystko"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Idioma"
IDS_USE_LOCALE_DATEFMT "Idioma define Formato da &Data"
IDS_MUI_MENU_THEMES "&Coleção de Esquemas"
IDM_THEMES_DEFAULT "&Padrão de Fábrica"
IDM_THEMES_FILE_ITEM "&Padrão"
IDM_THEMES_FACTORY_RESET "&Padrão de Fábrica"
IDM_THEMES_STD_CFG "&Padrão"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Limpar Tudo"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Idioma"
IDS_USE_LOCALE_DATEFMT "O idioma define o Formato da &Data"
IDS_MUI_MENU_THEMES "Colecção de e&squemas"
IDM_THEMES_DEFAULT "&Padrão da fabrico"
IDM_THEMES_FILE_ITEM "&Padrão"
IDM_THEMES_FACTORY_RESET "&Padrão da fabrico"
IDM_THEMES_STD_CFG "&Padrão"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Limpar tudo"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Язык"
IDS_USE_LOCALE_DATEFMT "Язык определяет &формат даты"
IDS_MUI_MENU_THEMES "&Коллекция схем"
IDM_THEMES_DEFAULT "&Заводские настройки"
IDM_THEMES_FILE_ITEM "&Стандартная"
IDM_THEMES_FACTORY_RESET "&Заводские настройки"
IDM_THEMES_STD_CFG "&Стандартная"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Очистить всё"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Jazyk prostredia"
IDS_USE_LOCALE_DATEFMT "Definovať jazyk a formát dátumu"
IDS_MUI_MENU_THEMES "&Výber motívu"
IDM_THEMES_DEFAULT "&Predvolené nastavenia"
IDM_THEMES_FILE_ITEM "&Štandardné"
IDM_THEMES_FACTORY_RESET "&Predvolené nastavenia"
IDM_THEMES_STD_CFG "&Štandardné"
IDS_MUI_STATUSBAR_PREFIXES "Riadok ,Stĺpec ,Výber ,Sb ,SLn ,Occ ,,,,,,,Znaky ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Vymazať všetko"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "Språk"
IDS_USE_LOCALE_DATEFMT "Använd valt språks datumformat"
IDS_MUI_MENU_THEMES "Schemasamling"
IDM_THEMES_DEFAULT "&Fabriksåterställning"
IDM_THEMES_FILE_ITEM "&Standard"
IDM_THEMES_FACTORY_RESET "&Fabriksåterställning"
IDM_THEMES_STD_CFG "&Standard Config"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Rensa alla"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Dil"
IDS_USE_LOCALE_DATEFMT "Language defines &Date Format"
IDS_MUI_MENU_THEMES "&Scheme Collection"
IDM_THEMES_DEFAULT "Fabrika Ayarları"
IDM_THEMES_FILE_ITEM "Standart"
IDM_THEMES_FACTORY_RESET "Fabrika Ayarları"
IDM_THEMES_STD_CFG "Standart"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Clear All"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "&Language"
IDS_USE_LOCALE_DATEFMT "Language defines &Date Format"
IDS_MUI_MENU_THEMES "&Scheme Collection"
IDM_THEMES_DEFAULT "&Factory Default"
IDM_THEMES_FILE_ITEM "&Standard"
IDM_THEMES_FACTORY_RESET "&Factory Default"
IDM_THEMES_STD_CFG "&Standard Config"
IDS_MUI_STATUSBAR_PREFIXES "Ln ,Col ,Sel ,Sb ,SLn ,Occ ,,,,,,,Ch ,Repl ,Eval ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Clear All"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "语言(&L)"
IDS_USE_LOCALE_DATEFMT "使用本地化的日期格式(&D)"
IDS_MUI_MENU_THEMES "语法高亮方案集(&S)"
IDM_THEMES_DEFAULT "工厂默认(&F)"
IDM_THEMES_FILE_ITEM "标准 (&S)" // Keep blank space before (&S)
IDM_THEMES_FACTORY_RESET "工厂默认(&F)"
IDM_THEMES_STD_CFG "标准 (&S)" // Keep blank space before (&S)
IDS_MUI_STATUSBAR_PREFIXES "行 ,列 ,选定 ,字节 ,选行 ,匹配 ,,,,,,,字符 ,改写 ,求值 ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "清除全部"

View File

@ -257,8 +257,8 @@ BEGIN
IDS_MUI_MENU_LANGUAGE "語言(&L)"
IDS_USE_LOCALE_DATEFMT "Language defines &Date Format"
IDS_MUI_MENU_THEMES "語法高亮方案(&S)"
IDM_THEMES_DEFAULT "工廠預設(&F)"
IDM_THEMES_FILE_ITEM "標準 (&S)" // Keep blank space before (&S)
IDM_THEMES_FACTORY_RESET "工廠預設(&F)"
IDM_THEMES_STD_CFG "標準 (&S)" // Keep blank space before (&S)
IDS_MUI_STATUSBAR_PREFIXES "行 ,列 ,選定 ,位元組 ,選行 ,符合 ,,,,,,,字元 ,改寫 ,求值 ,"
IDS_MUI_STATUSBAR_POSTFIXES ",,,,,,,,,,,,,,,"
IDS_CLEAR_ALL "Clear All"

View File

@ -1728,9 +1728,6 @@ void LoadSettings()
// ------------------------------------------------------------------------
IniSectionGetStringNoQuotes(Constants.Styles_Section, L"ThemeFileName", L"", Globals.LightThemeName, COUNTOF(Globals.LightThemeName));
IniSectionGetStringNoQuotes(Constants.Styles_Section, L"DarkThemeFileName", L"", Globals.DarkThemeName, COUNTOF(Globals.DarkThemeName));
// define scintilla internal codepage
int const iSciDefaultCodePage = SC_CP_UTF8; // default UTF8
@ -1755,6 +1752,10 @@ void LoadSettings()
CloseSettingsFile(bDirtyFlag, true); // keep cached
// --------------------------------------------------------------------------
const WCHAR *const IniSecStyles = Constants.Styles_Section;
// --------------------------------------------------------------------------
IniSectionGetString(IniSecStyles, L"ThemeFileName", L"", Settings.CurrentThemeName, COUNTOF(Settings.CurrentThemeName));
Style_Load(); // Scintilla Styles from .ini
ResetIniFileCache(); // clear cache
@ -1862,13 +1863,13 @@ static bool _SaveSettings(bool bForceSaveSettings)
}
WCHAR wchTmp[MAX_PATH] = { L'\0' };
if (StringCchCompareXIW(Settings.OpenWithDir, Defaults.OpenWithDir) != 0) {
if (StringCchCompareXI(Settings.OpenWithDir, Defaults.OpenWithDir) != 0) {
PathRelativeToApp(Settings.OpenWithDir, wchTmp, COUNTOF(wchTmp), false, true, Flags.PortableMyDocs);
IniSectionSetString(IniSecSettings, L"OpenWithDir", wchTmp);
} else {
IniSectionDelete(IniSecSettings, L"OpenWithDir", false);
}
if (StringCchCompareXIW(Settings.FavoritesDir, Defaults.FavoritesDir) != 0) {
if (StringCchCompareXI(Settings.FavoritesDir, Defaults.FavoritesDir) != 0) {
PathRelativeToApp(Settings.FavoritesDir, wchTmp, COUNTOF(wchTmp), false, true, Flags.PortableMyDocs);
IniSectionSetString(IniSecSettings, L"Favorites", wchTmp);
} else {
@ -2059,21 +2060,12 @@ static bool _SaveSettings(bool bForceSaveSettings)
const WCHAR* const IniSecStyles = Constants.Styles_Section;
// --------------------------------------------------------------------------
if (GetModeThemeIndex() == 1) {
if (Globals.uCurrentThemeIndex == 0) {
IniSectionDelete(IniSecStyles, L"ThemeFileName", false);
Style_FileExtToIniSection(Globals.bIniFileFromScratch);
Style_ToIniSection(Globals.bIniFileFromScratch); // Scintilla Styles
}
if (Globals.idxLightModeTheme == Theme_FactoryLightMode) {
IniSectionDelete(IniSecStyles, L"ThemeFileName", false);
} else {
IniSectionSetString(IniSecStyles, L"ThemeFileName", Globals.LightThemeName);
}
if (Globals.idxDarkModeTheme == Theme_FactoryDarkMode) {
IniSectionDelete(IniSecStyles, L"DarkThemeFileName", false);
} else {
IniSectionSetString(IniSecStyles, L"DarkThemeFileName", Globals.DarkThemeName);
IniSectionSetString(IniSecStyles, L"ThemeFileName", Settings.CurrentThemeName);
}
return true;
@ -2182,7 +2174,7 @@ bool SaveAllSettings(bool bForceSaveSettings)
ok = CloseSettingsFile(true, bOpenedByMe); // reset/clear cache
// maybe separate INI files for Style-Themes
if (GetModeThemeIndex() >= 2) {
if (Globals.uCurrentThemeIndex > 0) {
Style_SaveSettings(bForceSaveSettings);
}

View File

@ -58,7 +58,6 @@ inline bool CheckDarkModeEnabled()
#endif
#define UseDarkMode() (IsDarkModeSupported() && CheckDarkModeEnabled())
#define GetModeThemeIndex() (UseDarkMode() ? Globals.idxDarkModeTheme : Globals.idxLightModeTheme)
#ifdef __cplusplus
}

View File

@ -1266,7 +1266,7 @@ extern "C" ENC_DET_T Encoding_DetectEncoding(LPWSTR pszFile, const char* lpData,
// --- 1st check for force encodings ---
LPCWSTR lpszExt = PathFindExtension(pszFile);
bool const bNfoDizDetected = (lpszExt && !(StringCchCompareXI(lpszExt, L".nfo") && StringCchCompareXI(lpszExt, L".diz")));
bool const bNfoDizDetected = (lpszExt && ((StringCchCompareXI(lpszExt, L".nfo") == 0) || (StringCchCompareXI(lpszExt, L".diz") == 0)));
encDetRes.forcedEncoding = (Settings.LoadNFOasOEM && bNfoDizDetected) ? Globals.DOSEncoding : Encoding_Forced(CPI_GET);

View File

@ -667,9 +667,8 @@ static void _InitGlobals()
Globals.FindReplaceMatchFoundState = FND_NOP;
Globals.bDocHasInconsistentEOLs = false;
Globals.pStdDarkModeIniStyles = NULL;
Globals.idxLightModeTheme = Theme_FactoryLightMode;
Globals.idxDarkModeTheme = Theme_FactoryDarkMode;
Globals.bMinimizedToTray = false;
Globals.uCurrentThemeIndex = 0;
Flags.bHugeFileLoadState = DefaultFlags.bHugeFileLoadState = false;
Flags.bDevDebugMode = DefaultFlags.bDevDebugMode = false;
@ -887,8 +886,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
}
FreeResource(hMem);
Style_ImportTheme(GetModeThemeIndex());
Style_ImportTheme(Globals.uCurrentThemeIndex);
//SetProcessDPIAware(); -> .manifest
//SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE);
@ -3476,7 +3474,7 @@ LRESULT MsgInitMenu(HWND hwnd, WPARAM wParam, LPARAM lParam)
return FALSE;
}
bool const dm = UseDarkMode();
//bool const dm = UseDarkMode();
bool const si = Flags.bSingleFileInstance;
bool const cf = StrIsNotEmpty(Paths.CurrentFile);
bool const sav = Globals.bCanSaveIniFile;
@ -3827,9 +3825,6 @@ LRESULT MsgInitMenu(HWND hwnd, WPARAM wParam, LPARAM lParam)
CheckCmd(hmenu, IDM_VIEW_MINTOTRAY, Settings.MinimizeToTray);
CheckCmd(hmenu, IDM_VIEW_TRANSPARENT, Settings.TransparentMode);
EnableCmd(hmenu, IDM_THEMES_DEFAULT, !dm);
EnableCmd(hmenu, IDM_THEMES_RESOURCES, dm);
bool const dwr = (Settings.RenderingTechnology > SC_TECHNOLOGY_DEFAULT);
//bool const gdi = ((Settings.RenderingTechnology % SC_TECHNOLOGY_DIRECTWRITEDC) == 0);
@ -3931,9 +3926,9 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
}
#endif
bool const bIsThemesMenuCmd = ((iLoWParam >= IDM_THEMES_DEFAULT) && (iLoWParam < (int)(IDM_THEMES_DEFAULT + ThemeItems_CountOf())));
bool const bIsThemesMenuCmd = ((iLoWParam >= IDM_THEMES_FACTORY_RESET) && (iLoWParam < (int)(IDM_THEMES_FACTORY_RESET + ThemeItems_CountOf())));
if (bIsThemesMenuCmd) {
Style_DynamicThemesMenuCmd(iLoWParam, GetModeThemeIndex());
Style_DynamicThemesMenuCmd(iLoWParam);
return FALSE;
}
@ -5730,7 +5725,6 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
#ifdef D_NP3_WIN10_DARK_MODE
case IDM_VIEW_WIN_DARK_MODE: {
unsigned const iCurTheme = GetModeThemeIndex();
Settings.WinThemeDarkMode = !Settings.WinThemeDarkMode; // toggle
@ -5740,9 +5734,10 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
}
Defaults.ShowMenubar = !Settings.WinThemeDarkMode; // (!) need for saving
Globals.uCurrentThemeIndex = 0;
Settings.CurrentThemeName[0] = L'\0';
SetDarkMode(Settings.WinThemeDarkMode);
Style_DynamicThemesMenuCmd(GetModeThemeIndex() + IDM_THEMES_DEFAULT, iCurTheme);
Style_DynamicThemesMenuCmd(IDM_THEMES_FACTORY_RESET);
if (IsWindow(Globals.hwndDlgFindReplace)) {
//~SendMessage(Globals.hwndDlgFindReplace, WM_THEMECHANGED, 0, 0); ~ (!) incomplete update

View File

@ -303,9 +303,7 @@ static inline bool HasIndicStyleStrokeWidth(const int indicStyle) {
//=============================================================================
THEMEFILES Theme_Files[] = {
{ 0, L"Factory Light Mode", L"" },
{ 0, L"Factory Dark Mode", L"" },
{ 0, L"Customized Mode", L"" },
{ 0, L"Standard Config", L"" },
{ 0, L"", L"" },
{ 0, L"", L"" },
{ 0, L"", L"" },
@ -337,25 +335,27 @@ unsigned ThemeItems_CountOf()
return COUNTOF(Theme_Files);
}
unsigned ThemesItems_MaxIndex()
{
for (unsigned i = 1; i < ThemeItems_CountOf(); ++i) {
if (Theme_Files[i].rid == 0) {
return (i - 1);
}
}
return (ThemeItems_CountOf() - 1);
}
static void _FillThemesMenuTable()
{
WCHAR tchThemeDir[MAX_PATH] = { L'\0' };
Theme_Files[Theme_FactoryLightMode].rid = IDM_THEMES_DEFAULT; // factory default
Theme_Files[Theme_FactoryDarkMode].rid = IDM_THEMES_RESOURCES;
Theme_Files[Theme_CustomizedMode].rid = IDM_THEMES_FILE_ITEM; // NP3.ini settings
// find "themes" sub-dir (side-by-side to Notepad3.ini)
StringCchCopy(Theme_Files[Theme_FactoryLightMode].szFilePath, COUNTOF(Theme_Files[Theme_FactoryLightMode].szFilePath), L"");
StringCchCopy(Theme_Files[Theme_FactoryDarkMode].szFilePath, COUNTOF(Theme_Files[Theme_FactoryDarkMode].szFilePath), L"");
Globals.uCurrentThemeIndex = 0;
Theme_Files[Globals.uCurrentThemeIndex].rid = IDM_THEMES_STD_CFG; // NP3.ini settings
if (StrIsNotEmpty(Paths.IniFile)) {
StringCchCopy(tchThemeDir, COUNTOF(tchThemeDir), Paths.IniFile);
// names are filled by Style_InsertThemesMenu()
StringCchCopy(Theme_Files[Theme_CustomizedMode].szFilePath, COUNTOF(Theme_Files[Theme_CustomizedMode].szFilePath), Paths.IniFile);
//PathCchRemoveFileSpec(tchThemeDir, COUNTOF(tchThemeDir));
//PathCchAppend(tchThemeDir, COUNTOF(tchThemeDir), L"NP3DMStyle.ini");
//StringCchCopy(Theme_Files[Theme_CustomizedMode].szFilePath, COUNTOF(Theme_Files[ThemeItem_DarkMode].szFilePath), tchThemeDir); // @@@ ToDo: where to store changes
StringCchCopy(Theme_Files[0].szFilePath, COUNTOF(Theme_Files[0].szFilePath), Paths.IniFile);
} else if (StrIsNotEmpty(Paths.IniFileDefault)) {
StringCchCopy(tchThemeDir, COUNTOF(tchThemeDir), Paths.IniFileDefault);
}
@ -364,9 +364,7 @@ static void _FillThemesMenuTable()
PathCchAppend(tchThemeDir, COUNTOF(tchThemeDir), L"themes");
}
unsigned iTheme = Theme_CustomizedMode + 1;
unsigned iTheme = 1;
if (PathIsDirectory(tchThemeDir)) {
WCHAR tchThemePath[MAX_PATH] = { L'\0' };
StringCchCopy(tchThemePath, COUNTOF(tchThemePath), tchThemeDir);
@ -377,13 +375,16 @@ static void _FillThemesMenuTable()
HANDLE hFindFile = FindFirstFile(tchThemePath, &FindFileData);
if (IS_VALID_HANDLE(hFindFile)) {
// --- fill table by directory entries ---
for (iTheme = Theme_CustomizedMode + 1; iTheme < ThemeItems_CountOf(); ++iTheme) {
Theme_Files[iTheme].rid = (iTheme + IDM_THEMES_DEFAULT);
for (iTheme = 1; iTheme < ThemeItems_CountOf(); ++iTheme) {
Theme_Files[iTheme].rid = (iTheme + IDM_THEMES_STD_CFG);
StringCchCopy(tchThemePath, COUNTOF(tchThemePath), PathFindFileName(FindFileData.cFileName));
PathRemoveExtension(tchThemePath);
StringCchCopy(Theme_Files[iTheme].szName, COUNTOF(Theme_Files[iTheme].szName), tchThemePath);
if (StringCchCompareXI(Theme_Files[iTheme].szName, Settings.CurrentThemeName) == 0) {
Globals.uCurrentThemeIndex = iTheme;
}
StringCchCopy(tchThemePath, COUNTOF(tchThemePath), tchThemeDir);
PathCchAppend(tchThemePath, COUNTOF(tchThemePath), FindFileData.cFileName);
StringCchCopy(Theme_Files[iTheme].szFilePath, COUNTOF(Theme_Files[iTheme].szFilePath), tchThemePath);
@ -421,22 +422,23 @@ static HMENU s_hmenuThemes = NULL;
bool Style_InsertThemesMenu(HMENU hMenuBar)
{
if (s_hmenuThemes) {
DestroyMenu(s_hmenuThemes);
}
s_hmenuThemes = CreatePopupMenu();
//int const pos = GetMenuItemCount(hMenuBar) - 2;
GetLngString(Theme_Files[Theme_FactoryLightMode].rid, Theme_Files[Theme_FactoryLightMode].szName, COUNTOF(Theme_Files[Theme_FactoryLightMode].szName));
GetLngString(Theme_Files[Theme_FactoryDarkMode].rid, Theme_Files[Theme_FactoryDarkMode].szName, COUNTOF(Theme_Files[Theme_FactoryDarkMode].szName));
GetLngString(Theme_Files[Theme_CustomizedMode].rid, Theme_Files[Theme_CustomizedMode].szName, COUNTOF(Theme_Files[Theme_CustomizedMode].szName));
WCHAR tchThemeName[SMALL_BUFFER] = { L'\0' };
GetLngString(IDM_THEMES_FACTORY_RESET, tchThemeName, COUNTOF(tchThemeName));
AppendMenu(s_hmenuThemes, MF_ENABLED | MF_STRING, IDM_THEMES_FACTORY_RESET, tchThemeName);
AppendMenu(s_hmenuThemes, MF_SEPARATOR, 0, 0);
UINT iMaxRID = 0;
for (unsigned i = 0; i < ThemeItems_CountOf(); ++i) {
if (i == (Theme_CustomizedMode + 1)) {
AppendMenu(s_hmenuThemes, MF_SEPARATOR, 0, 0);
}
if (Theme_Files[i].rid > 0) {
AppendMenu(s_hmenuThemes, MF_ENABLED | MF_STRING, Theme_Files[i].rid, Theme_Files[i].szName);
iMaxRID = Theme_Files[i].rid;
AppendMenu(s_hmenuThemes, MF_ENABLED | MF_STRING, iMaxRID, Theme_Files[i].szName);
} else {
break; // done
}
@ -449,10 +451,11 @@ bool Style_InsertThemesMenu(HMENU hMenuBar)
//bool const res = InsertMenu(hMenuBar, pos, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)s_hmenuThemes, wchMenuItemStrg);
bool const res = InsertMenu(hMenuBar, IDM_VIEW_SCHEMECONFIG, MF_BYCOMMAND | MF_POPUP | MF_STRING, (UINT_PTR)s_hmenuThemes, wchMenuItemStrg);
unsigned const iTheme = GetModeThemeIndex();
CheckCmd(hMenuBar, Theme_Files[iTheme].rid, true);
unsigned const iTheme = Globals.uCurrentThemeIndex;
if ((iTheme >= Theme_CustomizedMode) && StrIsEmpty(Theme_Files[iTheme].szFilePath)) {
CheckMenuRadioItem(hMenuBar, IDM_THEMES_STD_CFG, iMaxRID, IDM_THEMES_STD_CFG + iTheme, MF_BYCOMMAND);
if (StrIsEmpty(Theme_Files[iTheme].szFilePath)) {
EnableCmd(hMenuBar, Theme_Files[iTheme].rid, false);
}
@ -465,54 +468,38 @@ bool Style_InsertThemesMenu(HMENU hMenuBar)
// Style_DynamicThemesMenuCmd() - Handles IDS_MUI_MENU_THEMES messages
//
//
static void _EnableSchemeConfig(const bool bEnable)
{
EnableCmd(GetMenu(Globals.hwndMain), IDM_VIEW_SCHEMECONFIG, bEnable);
EnableTool(Globals.hwndToolbar, IDT_VIEW_SCHEMECONFIG, bEnable);
}
//
void Style_DynamicThemesMenuCmd(int cmd, unsigned iCurThemeIdx)
void Style_DynamicThemesMenuCmd(int cmd)
{
unsigned const iThemeIdx = (unsigned)(cmd - IDM_THEMES_DEFAULT); // consecutive IDs
if (iThemeIdx >= ThemeItems_CountOf()) {
int const iThemeIdx = (int)(cmd - IDM_THEMES_STD_CFG); // consecutive IDs, -1 for factory reset
unsigned const iMaxIndex = ThemesItems_MaxIndex();
if ((iThemeIdx > (int)iMaxIndex) || (iThemeIdx == (int)Globals.uCurrentThemeIndex)) {
return;
}
if (iThemeIdx == iCurThemeIdx) {
return;
}
CheckCmd(Globals.hMainMenu, Theme_Files[iCurThemeIdx].rid, false);
if (Settings.SaveSettings) {
if (iCurThemeIdx <= Theme_FactoryDarkMode) {
// hard-coded internal/factory defaults
} else if (iCurThemeIdx == Theme_CustomizedMode) {
if (Globals.uCurrentThemeIndex == 0) {
if (!Flags.bSettingsFileSoftLocked) {
Globals.bCanSaveIniFile = CreateIniFile(Paths.IniFile, NULL);
if (Globals.bCanSaveIniFile) {
Style_ExportToFile(Paths.IniFile, Globals.bIniFileFromScratch);
}
}
} else if (PathIsExistingFile(Theme_Files[iCurThemeIdx].szFilePath)) {
Style_ExportToFile(Theme_Files[iCurThemeIdx].szFilePath, false);
} else if (PathIsExistingFile(Theme_Files[Globals.uCurrentThemeIndex].szFilePath)) {
Style_ExportToFile(Theme_Files[Globals.uCurrentThemeIndex].szFilePath, false);
}
}
bool const result = Style_ImportTheme(iThemeIdx);
bool const result = Style_ImportTheme(iThemeIdx); // -1: factory reset
if (result) {
if (UseDarkMode()) {
StringCchCopy(Globals.DarkThemeName, COUNTOF(Globals.DarkThemeName), Theme_Files[iThemeIdx].szName);
Globals.idxDarkModeTheme = iThemeIdx;
} else {
StringCchCopy(Globals.LightThemeName, COUNTOF(Globals.LightThemeName), Theme_Files[iThemeIdx].szName);
Globals.idxLightModeTheme = iThemeIdx;
}
unsigned const iTheme = (unsigned)clampi(iThemeIdx, 0, (int)ThemeItems_CountOf() - 1);
Globals.uCurrentThemeIndex = iTheme;
StringCchCopy(Settings.CurrentThemeName, COUNTOF(Settings.CurrentThemeName), Theme_Files[iTheme].szName);
_EnableSchemeConfig(iThemeIdx >= Theme_CustomizedMode);
CheckCmd(Globals.hMainMenu, Theme_Files[iThemeIdx].rid, true);
CheckMenuRadioItem(Globals.hMainMenu, IDM_THEMES_STD_CFG, Theme_Files[iMaxIndex].rid, IDM_THEMES_STD_CFG + iTheme, MF_BYCOMMAND);
if (IsWindow(Globals.hwndDlgCustomizeSchemes)) {
SendMessage(Globals.hwndDlgCustomizeSchemes, WM_THEMECHANGED, 0, 0);
@ -644,34 +631,8 @@ void Style_Load()
}
_FillThemesMenuTable();
unsigned iTheme = Theme_CustomizedMode;
if (StrIsNotEmpty(Globals.LightThemeName)) {
for (; iTheme < ThemeItems_CountOf(); ++iTheme) {
if (StringCchCompareXI(Globals.LightThemeName, Theme_Files[iTheme].szName) == 0) {
break;
}
}
}
Globals.idxLightModeTheme = (iTheme < ThemeItems_CountOf()) ? iTheme : Theme_FactoryLightMode;
StringCchCopy(Globals.LightThemeName, COUNTOF(Globals.LightThemeName),
Theme_Files[Globals.idxLightModeTheme].szName);
iTheme = Theme_CustomizedMode;
if (StrIsNotEmpty(Globals.DarkThemeName)) {
for (; iTheme < ThemeItems_CountOf(); ++iTheme) {
if (StringCchCompareXI(Globals.DarkThemeName, Theme_Files[iTheme].szName) == 0) {
break;
}
}
}
Globals.idxDarkModeTheme = (iTheme < ThemeItems_CountOf()) ? iTheme : Theme_FactoryDarkMode;
StringCchCopy(Globals.DarkThemeName, COUNTOF(Globals.DarkThemeName),
Theme_Files[Globals.idxDarkModeTheme].szName);
Style_LoadLexerFileExtensions();
Style_ImportTheme(GetModeThemeIndex());
Style_ImportTheme(Globals.uCurrentThemeIndex);
}
@ -872,14 +833,16 @@ bool Style_ImportFromFile(const WCHAR* szFile)
//
// Style_ImportTheme()
//
bool Style_ImportTheme(const unsigned iThemeIdx) {
bool Style_ImportTheme(const int iThemeIdx) {
switch (iThemeIdx) {
case Theme_FactoryLightMode:
return Style_ImportFromFile(L"");
case Theme_FactoryDarkMode:
return Style_ImportFromBinaryBlob(Globals.pStdDarkModeIniStyles);
case -1:
if (!UseDarkMode()) {
return Style_ImportFromFile(L"");
} else {
return Style_ImportFromBinaryBlob(Globals.pStdDarkModeIniStyles);
}
default:
if (iThemeIdx < ThemeItems_CountOf() && PathIsExistingFile(Theme_Files[iThemeIdx].szFilePath)) {
if ((iThemeIdx >= 0) && (iThemeIdx < (int)ThemeItems_CountOf()) && PathIsExistingFile(Theme_Files[iThemeIdx].szFilePath)) {
return Style_ImportFromFile(Theme_Files[iThemeIdx].szFilePath);
}
break;
@ -895,7 +858,7 @@ bool Style_ImportTheme(const unsigned iThemeIdx) {
void Style_SaveSettings(bool bForceSaveSettings)
{
if (Settings.SaveSettings || bForceSaveSettings) {
Style_ExportToFile(Theme_Files[GetModeThemeIndex()].szFilePath, Globals.bIniFileFromScratch);
Style_ExportToFile(Theme_Files[Globals.uCurrentThemeIndex].szFilePath, Globals.bIniFileFromScratch);
}
}
@ -1052,7 +1015,7 @@ void Style_ToIniSection(bool bForceAll)
bool Style_ExportToFile(const WCHAR* szFile, bool bForceAll)
{
if (StrIsEmpty(szFile)) {
if (GetModeThemeIndex() != 0) {
if (Globals.uCurrentThemeIndex != 0) {
InfoBoxLng(MB_ICONWARNING, NULL, IDS_MUI_SETTINGSNOTSAVED);
}
return false;
@ -3962,9 +3925,8 @@ static void _UpdateTitleText(HWND hwnd)
if (StrIsEmpty(s_OrigTitle)) {
GetWindowText(hwnd, s_OrigTitle, COUNTOF(s_OrigTitle));
}
unsigned const iTheme = max_u(1, GetModeThemeIndex());
WCHAR scheme[96] = { L'\0' };
StringCchCopy(scheme, COUNTOF(scheme), Theme_Files[iTheme].szName);
StringCchCopy(scheme, COUNTOF(scheme), Theme_Files[Globals.uCurrentThemeIndex].szName);
StrDelChr(scheme, L"&"); // rm hotkey mark
PWCHAR const e = StrChr(scheme, L' ');
if (e) {
@ -4614,7 +4576,7 @@ CASE_WM_CTLCOLOR_SET:
case IDOK: {
_ApplyDialogItemText(hwnd, pCurrentLexer, pCurrentStyle, iCurStyleIdx, bIsStyleSelected);
unsigned const iTheme = GetModeThemeIndex();
unsigned const iTheme = Globals.uCurrentThemeIndex;
if ((iTheme > 0) && (!bWarnedNoIniFile && StrIsEmpty(Theme_Files[iTheme].szFilePath))) {
InfoBoxLng(MB_ICONWARNING, NULL, IDS_MUI_SETTINGSNOTSAVED);
bWarnedNoIniFile = true;

View File

@ -29,13 +29,9 @@
int Style_NumOfLexers(); // Number of Lexers in pLexArray
#define Theme_FactoryLightMode (0U)
#define Theme_FactoryDarkMode (1U)
#define Theme_CustomizedMode (2U)
void Style_Load();
bool Style_Import(HWND hwnd);
bool Style_ImportTheme(const unsigned iThemeIdx);
bool Style_ImportTheme(const int iThemeIdx); // -1 => Factory Reset
void Style_LoadLexerFileExtensions();
bool Style_ImportFromFile(const WCHAR* szFile);
bool Style_ImportFromBinaryBlob(LPCSTR szCharResorce);
@ -47,7 +43,7 @@ bool Style_ExportToFile(const WCHAR* szFile, bool bForceAll);
unsigned ThemeItems_CountOf();
bool Style_InsertThemesMenu(HMENU hMenuBar);
void Style_DynamicThemesMenuCmd(int cmd, unsigned iCurThemeIdx);
void Style_DynamicThemesMenuCmd(int cmd);
float Style_GetCurrentFontSize();
void Style_SetLexer(HWND hwnd,PEDITLEXER pLexNew);

View File

@ -406,9 +406,8 @@ typedef struct _globals_t
bool bReplaceInitialized;
bool bDocHasInconsistentEOLs;
unsigned uCurrentThemeIndex;
char * pStdDarkModeIniStyles;
unsigned idxLightModeTheme;
unsigned idxDarkModeTheme;
#ifdef D_NP3_WIN10_DARK_MODE
HBRUSH hbrDarkModeBkgBrush;
@ -418,8 +417,6 @@ typedef struct _globals_t
FR_STATES FindReplaceMatchFoundState;
WCHAR CurrentLngLocaleName[LOCALE_NAME_MAX_LENGTH + 1];
WCHAR LightThemeName[SMALL_BUFFER];
WCHAR DarkThemeName[SMALL_BUFFER];
} GLOBALS_T, *PGLOBALS_T;
@ -550,6 +547,7 @@ typedef struct _settings_t
WCHAR FavoritesDir[MAX_PATH];
WCHAR ToolbarButtons[MIDSZ_BUFFER];
WCHAR MultiEdgeLines[MIDSZ_BUFFER];
WCHAR CurrentThemeName[MINI_BUFFER];
} SETTINGS_T, *PSETTINGS_T;