Add comments for Style Configurator's parameters

This commit is contained in:
Don Ho 2024-09-01 16:56:06 +02:00
parent 21e5350f90
commit 43ebe796af
2 changed files with 12 additions and 5 deletions

View File

@ -528,6 +528,7 @@ intptr_t CALLBACK WordStyleDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM
case CPN_COLOURPICKED:
{
int applicationInfo = getApplicationInfo();
int tabColourIndex = whichTabColourIndex();
if (reinterpret_cast<HWND>(lParam) == _pFgColour->getHSelf())
@ -665,7 +666,9 @@ int WordStyleDlg::getApplicationInfo() const
}
if (lstrcmp(styleName, L"Default Style") == 0)
{
return (GENERAL_CHANGE | THEME_CHANGE);
}
if ((lstrcmp(styleName, L"Mark Style 1") == 0) ||
(lstrcmp(styleName, L"Mark Style 2") == 0) ||
@ -682,7 +685,9 @@ int WordStyleDlg::getApplicationInfo() const
(lstrcmp(styleName, L"Tab color dark mode 3") == 0) ||
(lstrcmp(styleName, L"Tab color dark mode 4") == 0) ||
(lstrcmp(styleName, L"Tab color dark mode 5") == 0))
{
return (GENERAL_CHANGE | COLOR_CHANGE_4_MENU);
}
return GENERAL_CHANGE;
}

View File

@ -26,10 +26,12 @@
#define WM_UPDATESCINTILLAS (WORDSTYLE_USER + 1) // WM_UPDATESCINTILLAS (BOOL doChangePanel, 0)
#define WM_UPDATEMAINMENUBITMAPS (WORDSTYLE_USER + 2)
#define NO_VISUAL_CHANGE 0x00
#define GENERAL_CHANGE 0x01
#define THEME_CHANGE 0x02
#define COLOR_CHANGE_4_MENU 0x04
// The following parameters are for apply() method which will re-initialize the followings GUI with modified styler:
// 2 Scintilla edit zones, Search result (displayed by Sintilla), Notepad++ GUI & components concerning theme
#define NO_VISUAL_CHANGE 0x00 // No need to apply visual effect - User ext.
#define GENERAL_CHANGE 0x01 // For Sintilla zones & Notepad++ GUI
#define THEME_CHANGE 0x02 // For the components concerning theme, for example the background color of dockable panels
#define COLOR_CHANGE_4_MENU 0x04 // For the color items displayed on the menu
enum fontStyleType {BOLD_STATUS, ITALIC_STATUS, UNDERLINE_STATUS};