diff --git a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp index 648dcb2e5..d92756ba2 100644 --- a/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp +++ b/PowerEditor/src/WinControls/ColourPicker/WordStyleDlg.cpp @@ -905,81 +905,105 @@ void WordStyleDlg::setStyleListFromLexer(int index) std::pair WordStyleDlg::goToPreferencesSettings() { std::pair result; - result.first = -1; - result.second = -1; + result.first = -1; // Page + result.second = -1; // Control + + enum preferencesSectionPage { + general = 0, + edit1, + edit2, + darkMode, + margins, + newDocument, + defaultDirectory, + recentFileHistory, + fileAssociation, + language, + highlighting, + print, + searching, + backup, + autoCompletion, + multiInstance, + delimiter, + performance, + cloudAndLink, + searchEngine, + misc + }; Style& style = getCurrentStyler(); // Global override style if (style._styleDesc == TEXT("Current line background colour")) { - result.first = 1; + result.first = edit1; result.second = IDC_RADIO_CLM_HILITE; } else if (style._styleDesc == TEXT("Caret colour")) { - result.first = 1; + result.first = edit1; result.second = IDC_WIDTH_COMBO; } else if (style._styleDesc == TEXT("Edge colour")) { - result.first = 3; + result.first = margins; result.second = IDC_COLUMNPOS_EDIT; } else if (style._styleDesc == TEXT("Line number margin")) { - result.first = 3; + result.first = margins; result.second = IDC_CHECK_LINENUMBERMARGE; } else if (style._styleDesc == TEXT("Bookmark margin")) { - result.first = 3; + result.first = margins; result.second = IDC_CHECK_BOOKMARKMARGE; } else if (style._styleDesc == TEXT("Change History margin")) { - result.first = 3; + result.first = margins; result.second = IDC_CHECK_CHANGHISTORYMARGIN; } else if (style._styleDesc == TEXT("Fold") || style._styleDesc == TEXT("Fold active") || style._styleDesc == TEXT("Fold margin")) { - result.first = 3; + result.first = margins; result.second = IDC_RADIO_BOX; } else if (style._styleDesc == TEXT("Smart Highlighting")) { - result.first = 9; + result.first = highlighting; result.second = IDC_CHECK_ENABLSMARTHILITE; } else if (style._styleDesc == TEXT("Tags match highlighting")) { - result.first = 9; + result.first = highlighting; result.second = IDC_CHECK_ENABLTAGSMATCHHILITE; } else if (style._styleDesc == TEXT("Tags attribute")) { - result.first = 9; + result.first = highlighting; result.second = IDC_CHECK_ENABLTAGATTRHILITE; } else if (style._styleDesc == TEXT("Mark Style 1") || style._styleDesc == TEXT("Mark Style 2") || style._styleDesc == TEXT("Mark Style 3") || style._styleDesc == TEXT("Mark Style 4") || style._styleDesc == TEXT("Mark Style 5")) { - result.first = 9; + result.first = highlighting; result.second = IDC_CHECK_MARKALLCASESENSITIVE; } else if (style._styleDesc == TEXT("URL hovered")) { - result.first = 17; + result.first = cloudAndLink; result.second = IDC_CHECK_CLICKABLELINK_ENABLE; } else if (style._styleDesc == TEXT("EOL custom color")) { - result.first = 2; + result.first = edit2; result.second = IDC_CHECK_WITHCUSTOMCOLOR_CRLF; } else if (style._styleDesc == g_npcStyleName) { - result.first = 2; + result.first = edit2; result.second = IDC_CHECK_NPC_COLOR; }