Add Fluent UI icons for Dark mode

Add Fluent UI icons for Dark mode in the toolbar & the tabbar

Fix #9742, close #9831
This commit is contained in:
Don HO 2021-05-06 04:04:25 +02:00
parent 666f228027
commit db27172ca8
108 changed files with 549 additions and 196 deletions

View File

@ -48,72 +48,73 @@ enum tb_stat {tb_saved, tb_unsaved, tb_ro, tb_monitored};
#define DIR_RIGHT false
int docTabIconIDs[] = { IDI_SAVED_ICON, IDI_UNSAVED_ICON, IDI_READONLY_ICON, IDI_MONITORING_ICON };
int docTabIconIDs_darkMode[] = { IDI_SAVED_DM_ICON, IDI_UNSAVED_DM_ICON, IDI_READONLY_DM_ICON, IDI_MONITORING_DM_ICON };
int docTabIconIDs_alt[] = { IDI_SAVED_ALT_ICON, IDI_UNSAVED_ALT_ICON, IDI_READONLY_ALT_ICON, IDI_MONITORING_ICON };
ToolBarButtonUnit toolBarIcons[] = {
{IDM_FILE_NEW, IDI_NEW_ICON, IDI_NEW_ICON, IDI_NEW_ICON2, IDI_NEW_ICON2, IDR_FILENEW},
{IDM_FILE_OPEN, IDI_OPEN_ICON, IDI_OPEN_ICON, IDI_OPEN_ICON2, IDI_OPEN_ICON2, IDR_FILEOPEN},
{IDM_FILE_SAVE, IDI_SAVE_ICON, IDI_SAVE_DISABLE_ICON, IDI_SAVE_ICON2, IDI_SAVE_DISABLE_ICON2, IDR_FILESAVE},
{IDM_FILE_SAVEALL, IDI_SAVEALL_ICON, IDI_SAVEALL_DISABLE_ICON, IDI_SAVEALL_ICON2, IDI_SAVEALL_DISABLE_ICON2, IDR_SAVEALL},
{IDM_FILE_CLOSE, IDI_CLOSE_ICON, IDI_CLOSE_ICON, IDI_CLOSE_ICON2, IDI_CLOSE_ICON2, IDR_CLOSEFILE},
{IDM_FILE_CLOSEALL, IDI_CLOSEALL_ICON, IDI_CLOSEALL_ICON, IDI_CLOSEALL_ICON2, IDI_CLOSEALL_ICON2, IDR_CLOSEALL},
{IDM_FILE_PRINT, IDI_PRINT_ICON, IDI_PRINT_ICON, IDI_PRINT_ICON2, IDI_PRINT_ICON2, IDR_PRINT},
{IDM_FILE_NEW, IDI_NEW_ICON, IDI_NEW_ICON, IDI_NEW_ICON2, IDI_NEW_ICON2, IDI_NEW_ICON_DM, IDI_NEW_ICON_DM, IDI_NEW_ICON_DM2, IDI_NEW_ICON_DM2, IDR_FILENEW},
{IDM_FILE_OPEN, IDI_OPEN_ICON, IDI_OPEN_ICON, IDI_OPEN_ICON2, IDI_OPEN_ICON2, IDI_OPEN_ICON_DM, IDI_OPEN_ICON_DM, IDI_OPEN_ICON_DM2, IDI_OPEN_ICON_DM2, IDR_FILEOPEN},
{IDM_FILE_SAVE, IDI_SAVE_ICON, IDI_SAVE_DISABLE_ICON, IDI_SAVE_ICON2, IDI_SAVE_DISABLE_ICON2, IDI_SAVE_ICON_DM, IDI_SAVE_DISABLE_ICON_DM, IDI_SAVE_ICON_DM2, IDI_SAVE_DISABLE_ICON_DM2, IDR_FILESAVE},
{IDM_FILE_SAVEALL, IDI_SAVEALL_ICON, IDI_SAVEALL_DISABLE_ICON, IDI_SAVEALL_ICON2, IDI_SAVEALL_DISABLE_ICON2, IDI_SAVEALL_ICON_DM, IDI_SAVEALL_DISABLE_ICON_DM, IDI_SAVEALL_ICON_DM2, IDI_SAVEALL_DISABLE_ICON_DM2, IDR_SAVEALL},
{IDM_FILE_CLOSE, IDI_CLOSE_ICON, IDI_CLOSE_ICON, IDI_CLOSE_ICON2, IDI_CLOSE_ICON2, IDI_CLOSE_ICON_DM, IDI_CLOSE_ICON_DM, IDI_CLOSE_ICON_DM2, IDI_CLOSE_ICON_DM2, IDR_CLOSEFILE},
{IDM_FILE_CLOSEALL, IDI_CLOSEALL_ICON, IDI_CLOSEALL_ICON, IDI_CLOSEALL_ICON2, IDI_CLOSEALL_ICON2, IDI_CLOSEALL_ICON_DM, IDI_CLOSEALL_ICON_DM, IDI_CLOSEALL_ICON_DM2, IDI_CLOSEALL_ICON_DM2, IDR_CLOSEALL},
{IDM_FILE_PRINT, IDI_PRINT_ICON, IDI_PRINT_ICON, IDI_PRINT_ICON2, IDI_PRINT_ICON2, IDI_PRINT_ICON_DM, IDI_PRINT_ICON_DM, IDI_PRINT_ICON_DM2, IDI_PRINT_ICON_DM2, IDR_PRINT},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{IDM_EDIT_CUT, IDI_CUT_ICON, IDI_CUT_DISABLE_ICON, IDI_CUT_ICON2, IDI_CUT_DISABLE_ICON2, IDR_CUT},
{IDM_EDIT_COPY, IDI_COPY_ICON, IDI_COPY_DISABLE_ICON, IDI_COPY_ICON2, IDI_COPY_DISABLE_ICON2, IDR_COPY},
{IDM_EDIT_PASTE, IDI_PASTE_ICON, IDI_PASTE_DISABLE_ICON, IDI_PASTE_ICON2, IDI_PASTE_DISABLE_ICON2, IDR_PASTE},
{IDM_EDIT_CUT, IDI_CUT_ICON, IDI_CUT_DISABLE_ICON, IDI_CUT_ICON2, IDI_CUT_DISABLE_ICON2, IDI_CUT_ICON_DM, IDI_CUT_DISABLE_ICON_DM, IDI_CUT_ICON_DM2, IDI_CUT_DISABLE_ICON_DM2, IDR_CUT},
{IDM_EDIT_COPY, IDI_COPY_ICON, IDI_COPY_DISABLE_ICON, IDI_COPY_ICON2, IDI_COPY_DISABLE_ICON2, IDI_COPY_ICON_DM, IDI_COPY_DISABLE_ICON_DM, IDI_COPY_ICON_DM2, IDI_COPY_DISABLE_ICON_DM2, IDR_COPY},
{IDM_EDIT_PASTE, IDI_PASTE_ICON, IDI_PASTE_DISABLE_ICON, IDI_PASTE_ICON2, IDI_PASTE_DISABLE_ICON2, IDI_PASTE_ICON_DM, IDI_PASTE_DISABLE_ICON_DM, IDI_PASTE_ICON_DM2, IDI_PASTE_DISABLE_ICON_DM2, IDR_PASTE},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{IDM_EDIT_UNDO, IDI_UNDO_ICON, IDI_UNDO_DISABLE_ICON, IDI_UNDO_ICON2, IDI_UNDO_DISABLE_ICON2, IDR_UNDO},
{IDM_EDIT_REDO, IDI_REDO_ICON, IDI_REDO_DISABLE_ICON, IDI_REDO_ICON2, IDI_REDO_DISABLE_ICON2, IDR_REDO},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{IDM_EDIT_UNDO, IDI_UNDO_ICON, IDI_UNDO_DISABLE_ICON, IDI_UNDO_ICON2, IDI_UNDO_DISABLE_ICON2, IDI_UNDO_ICON_DM, IDI_UNDO_DISABLE_ICON_DM, IDI_UNDO_ICON_DM2, IDI_UNDO_DISABLE_ICON_DM2, IDR_UNDO},
{IDM_EDIT_REDO, IDI_REDO_ICON, IDI_REDO_DISABLE_ICON, IDI_REDO_ICON2, IDI_REDO_DISABLE_ICON2, IDI_REDO_ICON_DM, IDI_REDO_DISABLE_ICON_DM, IDI_REDO_ICON_DM2, IDI_REDO_DISABLE_ICON_DM2, IDR_REDO},
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{IDM_SEARCH_FIND, IDI_FIND_ICON, IDI_FIND_ICON, IDI_FIND_ICON2, IDI_FIND_ICON2, IDR_FIND},
{IDM_SEARCH_REPLACE, IDI_REPLACE_ICON, IDI_REPLACE_ICON, IDI_REPLACE_ICON2, IDI_REPLACE_ICON2, IDR_REPLACE},
{IDM_SEARCH_FIND, IDI_FIND_ICON, IDI_FIND_ICON, IDI_FIND_ICON2, IDI_FIND_ICON2, IDI_FIND_ICON_DM, IDI_FIND_ICON_DM, IDI_FIND_ICON_DM2, IDI_FIND_ICON_DM2, IDR_FIND},
{IDM_SEARCH_REPLACE, IDI_REPLACE_ICON, IDI_REPLACE_ICON, IDI_REPLACE_ICON2, IDI_REPLACE_ICON2, IDI_REPLACE_ICON_DM, IDI_REPLACE_ICON_DM, IDI_REPLACE_ICON_DM2, IDI_REPLACE_ICON_DM2, IDR_REPLACE},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{IDM_VIEW_ZOOMIN, IDI_ZOOMIN_ICON, IDI_ZOOMIN_ICON, IDI_ZOOMIN_ICON2, IDI_ZOOMIN_ICON2, IDR_ZOOMIN},
{IDM_VIEW_ZOOMOUT, IDI_ZOOMOUT_ICON, IDI_ZOOMOUT_ICON, IDI_ZOOMOUT_ICON2, IDI_ZOOMOUT_ICON2, IDR_ZOOMOUT},
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{IDM_VIEW_ZOOMIN, IDI_ZOOMIN_ICON, IDI_ZOOMIN_ICON, IDI_ZOOMIN_ICON2, IDI_ZOOMIN_ICON2, IDI_ZOOMIN_ICON_DM, IDI_ZOOMIN_ICON_DM, IDI_ZOOMIN_ICON_DM2, IDI_ZOOMIN_ICON_DM2, IDR_ZOOMIN},
{IDM_VIEW_ZOOMOUT, IDI_ZOOMOUT_ICON, IDI_ZOOMOUT_ICON, IDI_ZOOMOUT_ICON2, IDI_ZOOMOUT_ICON2, IDI_ZOOMOUT_ICON_DM, IDI_ZOOMOUT_ICON_DM, IDI_ZOOMOUT_ICON_DM2, IDI_ZOOMOUT_ICON_DM2, IDR_ZOOMOUT},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{IDM_VIEW_SYNSCROLLV, IDI_SYNCV_ICON, IDI_SYNCV_DISABLE_ICON, IDI_SYNCV_ICON2, IDI_SYNCV_DISABLE_ICON2, IDR_SYNCV},
{IDM_VIEW_SYNSCROLLH, IDI_SYNCH_ICON, IDI_SYNCH_DISABLE_ICON, IDI_SYNCH_ICON2, IDI_SYNCH_DISABLE_ICON2, IDR_SYNCH},
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{IDM_VIEW_SYNSCROLLV, IDI_SYNCV_ICON, IDI_SYNCV_DISABLE_ICON, IDI_SYNCV_ICON2, IDI_SYNCV_DISABLE_ICON2, IDI_SYNCV_ICON_DM, IDI_SYNCV_DISABLE_ICON_DM, IDI_SYNCV_ICON_DM2, IDI_SYNCV_DISABLE_ICON_DM2, IDR_SYNCV},
{IDM_VIEW_SYNSCROLLH, IDI_SYNCH_ICON, IDI_SYNCH_DISABLE_ICON, IDI_SYNCH_ICON2, IDI_SYNCH_DISABLE_ICON2, IDI_SYNCH_ICON_DM, IDI_SYNCH_DISABLE_ICON_DM, IDI_SYNCH_ICON_DM2, IDI_SYNCH_DISABLE_ICON_DM2, IDR_SYNCH},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{IDM_VIEW_WRAP, IDI_VIEW_WRAP_ICON, IDI_VIEW_WRAP_ICON, IDI_VIEW_WRAP_ICON2, IDI_VIEW_WRAP_ICON2, IDR_WRAP},
{IDM_VIEW_ALL_CHARACTERS, IDI_VIEW_ALL_CHAR_ICON, IDI_VIEW_ALL_CHAR_ICON, IDI_VIEW_ALL_CHAR_ICON2, IDI_VIEW_ALL_CHAR_ICON2, IDR_INVISIBLECHAR},
{IDM_VIEW_INDENT_GUIDE, IDI_VIEW_INDENT_ICON, IDI_VIEW_INDENT_ICON, IDI_VIEW_INDENT_ICON2, IDI_VIEW_INDENT_ICON2, IDR_INDENTGUIDE},
{IDM_LANG_USER_DLG, IDI_VIEW_UD_DLG_ICON, IDI_VIEW_UD_DLG_ICON, IDI_VIEW_UD_DLG_ICON2, IDI_VIEW_UD_DLG_ICON2, IDR_SHOWPANNEL},
{IDM_VIEW_DOC_MAP, IDI_VIEW_DOC_MAP_ICON, IDI_VIEW_DOC_MAP_ICON, IDI_VIEW_DOC_MAP_ICON2, IDI_VIEW_DOC_MAP_ICON2, IDR_DOCMAP},
{IDM_VIEW_FUNC_LIST, IDI_VIEW_FUNCLIST_ICON, IDI_VIEW_FUNCLIST_ICON, IDI_VIEW_FUNCLIST_ICON2, IDI_VIEW_FUNCLIST_ICON2, IDR_FUNC_LIST},
{IDM_VIEW_FILEBROWSER, IDI_VIEW_FILEBROWSER_ICON, IDI_VIEW_FILEBROWSER_ICON, IDI_VIEW_FILEBROWSER_ICON2, IDI_VIEW_FILEBROWSER_ICON2, IDR_FILEBROWSER},
{IDM_VIEW_MONITORING, IDI_VIEW_MONITORING_ICON, IDI_VIEW_MONITORING_ICON, IDI_VIEW_MONITORING_ICON2, IDI_VIEW_MONITORING_ICON2, IDR_FILEMONITORING},
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{IDM_VIEW_WRAP, IDI_VIEW_WRAP_ICON, IDI_VIEW_WRAP_ICON, IDI_VIEW_WRAP_ICON2, IDI_VIEW_WRAP_ICON2, IDI_VIEW_WRAP_ICON_DM, IDI_VIEW_WRAP_ICON_DM, IDI_VIEW_WRAP_ICON_DM2, IDI_VIEW_WRAP_ICON_DM2, IDR_WRAP},
{IDM_VIEW_ALL_CHARACTERS, IDI_VIEW_ALL_CHAR_ICON, IDI_VIEW_ALL_CHAR_ICON, IDI_VIEW_ALL_CHAR_ICON2, IDI_VIEW_ALL_CHAR_ICON2, IDI_VIEW_ALL_CHAR_ICON_DM, IDI_VIEW_ALL_CHAR_ICON_DM, IDI_VIEW_ALL_CHAR_ICON_DM2, IDI_VIEW_ALL_CHAR_ICON_DM2, IDR_INVISIBLECHAR},
{IDM_VIEW_INDENT_GUIDE, IDI_VIEW_INDENT_ICON, IDI_VIEW_INDENT_ICON, IDI_VIEW_INDENT_ICON2, IDI_VIEW_INDENT_ICON2, IDI_VIEW_INDENT_ICON_DM, IDI_VIEW_INDENT_ICON_DM, IDI_VIEW_INDENT_ICON_DM2, IDI_VIEW_INDENT_ICON_DM2, IDR_INDENTGUIDE},
{IDM_LANG_USER_DLG, IDI_VIEW_UD_DLG_ICON, IDI_VIEW_UD_DLG_ICON, IDI_VIEW_UD_DLG_ICON2, IDI_VIEW_UD_DLG_ICON2, IDI_VIEW_UD_DLG_ICON_DM, IDI_VIEW_UD_DLG_ICON_DM, IDI_VIEW_UD_DLG_ICON_DM2, IDI_VIEW_UD_DLG_ICON_DM2, IDR_SHOWPANNEL},
{IDM_VIEW_DOC_MAP, IDI_VIEW_DOC_MAP_ICON, IDI_VIEW_DOC_MAP_ICON, IDI_VIEW_DOC_MAP_ICON2, IDI_VIEW_DOC_MAP_ICON2, IDI_VIEW_DOC_MAP_ICON_DM, IDI_VIEW_DOC_MAP_ICON_DM, IDI_VIEW_DOC_MAP_ICON_DM2, IDI_VIEW_DOC_MAP_ICON_DM2, IDR_DOCMAP},
{IDM_VIEW_FUNC_LIST, IDI_VIEW_FUNCLIST_ICON, IDI_VIEW_FUNCLIST_ICON, IDI_VIEW_FUNCLIST_ICON2, IDI_VIEW_FUNCLIST_ICON2, IDI_VIEW_FUNCLIST_ICON_DM, IDI_VIEW_FUNCLIST_ICON_DM, IDI_VIEW_FUNCLIST_ICON_DM2, IDI_VIEW_FUNCLIST_ICON_DM2, IDR_FUNC_LIST},
{IDM_VIEW_FILEBROWSER, IDI_VIEW_FILEBROWSER_ICON, IDI_VIEW_FILEBROWSER_ICON, IDI_VIEW_FILEBROWSER_ICON2, IDI_VIEW_FILEBROWSER_ICON2, IDI_VIEW_FILEBROWSER_ICON_DM, IDI_VIEW_FILEBROWSER_ICON_DM, IDI_VIEW_FILEBROWSER_ICON_DM2, IDI_VIEW_FILEBROWSER_ICON_DM2, IDR_FILEBROWSER},
{IDM_VIEW_MONITORING, IDI_VIEW_MONITORING_ICON, IDI_VIEW_MONITORING_ICON, IDI_VIEW_MONITORING_ICON2, IDI_VIEW_MONITORING_ICON2, IDI_VIEW_MONITORING_ICON_DM, IDI_VIEW_MONITORING_ICON_DM, IDI_VIEW_MONITORING_ICON_DM2, IDI_VIEW_MONITORING_ICON_DM2, IDR_FILEMONITORING},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------//
{IDM_MACRO_STARTRECORDINGMACRO, IDI_STARTRECORD_ICON, IDI_STARTRECORD_DISABLE_ICON, IDI_STARTRECORD_ICON2, IDI_STARTRECORD_DISABLE_ICON2, IDR_STARTRECORD},
{IDM_MACRO_STOPRECORDINGMACRO, IDI_STOPRECORD_ICON, IDI_STOPRECORD_DISABLE_ICON, IDI_STOPRECORD_ICON2, IDI_STOPRECORD_DISABLE_ICON2, IDR_STOPRECORD},
{IDM_MACRO_PLAYBACKRECORDEDMACRO, IDI_PLAYRECORD_ICON, IDI_PLAYRECORD_DISABLE_ICON, IDI_PLAYRECORD_ICON2, IDI_PLAYRECORD_DISABLE_ICON2, IDR_PLAYRECORD},
{IDM_MACRO_RUNMULTIMACRODLG, IDI_MMPLAY_ICON, IDI_MMPLAY_DIS_ICON, IDI_MMPLAY_ICON2, IDI_MMPLAY_DIS_ICON2, IDR_M_PLAYRECORD},
{IDM_MACRO_SAVECURRENTMACRO, IDI_SAVERECORD_ICON, IDI_SAVERECORD_DISABLE_ICON, IDI_SAVERECORD_ICON2, IDI_SAVERECORD_DISABLE_ICON2, IDR_SAVERECORD}
{IDM_MACRO_STARTRECORDINGMACRO, IDI_STARTRECORD_ICON, IDI_STARTRECORD_DISABLE_ICON, IDI_STARTRECORD_ICON2, IDI_STARTRECORD_DISABLE_ICON2, IDI_STARTRECORD_ICON_DM, IDI_STARTRECORD_DISABLE_ICON_DM, IDI_STARTRECORD_ICON_DM2, IDI_STARTRECORD_DISABLE_ICON_DM2, IDR_STARTRECORD},
{IDM_MACRO_STOPRECORDINGMACRO, IDI_STOPRECORD_ICON, IDI_STOPRECORD_DISABLE_ICON, IDI_STOPRECORD_ICON2, IDI_STOPRECORD_DISABLE_ICON2, IDI_STOPRECORD_ICON_DM, IDI_STOPRECORD_DISABLE_ICON_DM, IDI_STOPRECORD_ICON_DM2, IDI_STOPRECORD_DISABLE_ICON_DM2, IDR_STOPRECORD},
{IDM_MACRO_PLAYBACKRECORDEDMACRO, IDI_PLAYRECORD_ICON, IDI_PLAYRECORD_DISABLE_ICON, IDI_PLAYRECORD_ICON2, IDI_PLAYRECORD_DISABLE_ICON2, IDI_PLAYRECORD_ICON_DM, IDI_PLAYRECORD_DISABLE_ICON_DM, IDI_PLAYRECORD_ICON_DM2, IDI_PLAYRECORD_DISABLE_ICON_DM2, IDR_PLAYRECORD},
{IDM_MACRO_RUNMULTIMACRODLG, IDI_MMPLAY_ICON, IDI_MMPLAY_DIS_ICON, IDI_MMPLAY_ICON2, IDI_MMPLAY_DIS_ICON2, IDI_MMPLAY_ICON_DM, IDI_MMPLAY_DIS_ICON_DM, IDI_MMPLAY_ICON_DM2, IDI_MMPLAY_DIS_ICON_DM2, IDR_M_PLAYRECORD},
{IDM_MACRO_SAVECURRENTMACRO, IDI_SAVERECORD_ICON, IDI_SAVERECORD_DISABLE_ICON, IDI_SAVERECORD_ICON2, IDI_SAVERECORD_DISABLE_ICON2, IDI_SAVERECORD_ICON_DM, IDI_SAVERECORD_DISABLE_ICON_DM, IDI_SAVERECORD_ICON_DM2, IDI_SAVERECORD_DISABLE_ICON_DM2, IDR_SAVERECORD}
};
@ -226,13 +227,17 @@ LRESULT Notepad_plus::init(HWND hwnd)
int iconDpiDynamicalSize = nppParam._dpiManager.scaleY(_toReduceTabBar ? 13 : 20);
_docTabIconList.create(iconDpiDynamicalSize, _pPublicInterface->getHinst(), docTabIconIDs, sizeof(docTabIconIDs) / sizeof(int));
_docTabIconListAlt.create(iconDpiDynamicalSize, _pPublicInterface->getHinst(), docTabIconIDs_alt, sizeof(docTabIconIDs_alt) / sizeof(int));
_docTabIconListDarkMode.create(iconDpiDynamicalSize, _pPublicInterface->getHinst(), docTabIconIDs_darkMode, sizeof(docTabIconIDs_darkMode) / sizeof(int));
vector<IconList *> pIconListVector;
pIconListVector.push_back(&_docTabIconList);
pIconListVector.push_back(&_docTabIconListAlt);
pIconListVector.push_back(&_docTabIconList); // 0
pIconListVector.push_back(&_docTabIconListAlt); // 1
pIconListVector.push_back(&_docTabIconListDarkMode);// 2
_mainDocTab.init(_pPublicInterface->getHinst(), hwnd, &_mainEditView, pIconListVector, (tabBarStatus & TAB_ALTICONS) ? 1 : 0);
_subDocTab.init(_pPublicInterface->getHinst(), hwnd, &_subEditView, pIconListVector, (tabBarStatus & TAB_ALTICONS) ? 1 : 0);
unsigned char indexDocTabIcon = NppDarkMode::isEnabled() ? 2 : ((tabBarStatus & TAB_ALTICONS) ? 1 : 0);
_mainDocTab.init(_pPublicInterface->getHinst(), hwnd, &_mainEditView, pIconListVector, indexDocTabIcon);
_subDocTab.init(_pPublicInterface->getHinst(), hwnd, &_subEditView, pIconListVector, indexDocTabIcon);
_mainEditView.display();
@ -7513,6 +7518,33 @@ void Notepad_plus::refreshDarkMode()
SendMessage(_incrementFindDlg.getHSelf(), NPPM_INTERNAL_REFRESHDARKMODE, 0, 0);
RedrawWindow(_pPublicInterface->getHSelf(), nullptr, nullptr, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_ALLCHILDREN);
RedrawWindow(_findReplaceDlg.getHSelf(), nullptr, nullptr, RDW_INVALIDATE | RDW_ERASE | RDW_FRAME | RDW_ALLCHILDREN);
SendMessage(_pPublicInterface->getHSelf(), NPPM_INTERNAL_CHANGETABBAEICONS, 0, NppDarkMode::isEnabled() ? 2 : 0);
toolBarStatusType state = _toolBar.getState();
switch (state)
{
case TB_SMALL:
_toolBar.reduce();
break;
case TB_LARGE:
_toolBar.enlarge();
break;
case TB_SMALL2:
_toolBar.reduceToSet2();
break;
case TB_LARGE2:
_toolBar.enlargeToSet2();
break;
case TB_STANDARD:
// Force standard colorful icon to Fluent UI small icon in dark mode
if (NppDarkMode::isEnabled())
_toolBar.reduce();
break;
}
if (NppDarkMode::isExperimentalEnabled())
{

View File

@ -298,6 +298,7 @@ private:
ToolBar _toolBar;
IconList _docTabIconList;
IconList _docTabIconListAlt;
IconList _docTabIconListDarkMode;
StatusBar _statusBar;
bool _toReduceTabBar = false;

View File

@ -154,15 +154,120 @@ IDI_VIEW_FUNCLIST_ICON2 ICON "icons/filledFluentUI/funcList_off.ico
IDI_VIEW_FILEBROWSER_ICON2 ICON "icons/filledFluentUI/fileBrowser_off.ico"
IDI_VIEW_MONITORING_ICON2 ICON "icons/filledFluentUI/monitoring_off.ico"
//
// TOOLBAR ICO - set 1 Dark Mode
//
IDI_NEW_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/new_off.ico"
IDI_OPEN_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/open_off.ico"
IDI_CLOSE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/supp_off.ico"
IDI_CLOSEALL_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/suppall_off.ico"
IDI_SAVE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/save_off.ico"
IDI_SAVEALL_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/saveall_off.ico"
IDI_CUT_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/cut_off.ico"
IDI_COPY_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/dupli_off.ico"
IDI_PASTE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/paste_off.ico"
IDI_UNDO_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/undo_off.ico"
IDI_REDO_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/redo_off.ico"
IDI_FIND_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/find_off.ico"
IDI_REPLACE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/findrep_off.ico"
IDI_ZOOMIN_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/zoomIn_off.ico"
IDI_ZOOMOUT_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/zoomOut_off.ico"
IDI_VIEW_UD_DLG_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/userDefineDlg_off.ico"
IDI_PRINT_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/imprim_off.ico"
IDI_STARTRECORD_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/startrecord_off.ico"
IDI_STARTRECORD_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/startrecord_dis.ico"
IDI_STOPRECORD_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/stoprecord_off.ico"
IDI_STOPRECORD_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/stoprecord_dis.ico"
IDI_PLAYRECORD_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/playrecord_off.ico"
IDI_PLAYRECORD_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/playrecord_dis.ico"
IDI_SAVERECORD_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/saverecord_off.ico"
IDI_SAVERECORD_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/saverecord_dis.ico"
IDI_MMPLAY_DIS_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/playrecord_m_dis.ico"
IDI_MMPLAY_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/playrecord_m_off.ico"
IDI_VIEW_ALL_CHAR_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/allChars_off.ico"
IDI_VIEW_INDENT_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/indentGuide_off.ico"
IDI_VIEW_WRAP_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/wrap_off.ico"
IDI_SAVE_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/save_dis.ico"
IDI_SAVEALL_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/saveall_dis.ico"
IDI_CUT_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/cut_dis.ico"
IDI_COPY_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/dupli_dis.ico"
IDI_PASTE_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/paste_dis.ico"
IDI_UNDO_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/undo_dis.ico"
IDI_REDO_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/redo_dis.ico"
IDI_SYNCV_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/syncV_off.ico"
IDI_SYNCV_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/syncV_dis.ico"
IDI_SYNCH_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/syncH_off.ico"
IDI_SYNCH_DISABLE_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/syncH_dis.ico"
IDI_VIEW_DOC_MAP_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/docMap_off.ico"
IDI_VIEW_FUNCLIST_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/funcList_off.ico"
IDI_VIEW_FILEBROWSER_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/fileBrowser_off.ico"
IDI_VIEW_MONITORING_ICON_DM ICON "icons/darkMode/toolbar/FluentUI/monitoring_off.ico"
//
// TOOLBAR ICO - set 2 Dark Mode
//
IDI_NEW_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/new_off.ico"
IDI_OPEN_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/open_off.ico"
IDI_CLOSE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/supp_off.ico"
IDI_CLOSEALL_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/suppall_off.ico"
IDI_SAVE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/save_off.ico"
IDI_SAVEALL_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/saveall_off.ico"
IDI_CUT_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/cut_off.ico"
IDI_COPY_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/dupli_off.ico"
IDI_PASTE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/paste_off.ico"
IDI_UNDO_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/undo_off.ico"
IDI_REDO_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/redo_off.ico"
IDI_FIND_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/find_off.ico"
IDI_REPLACE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/findrep_off.ico"
IDI_ZOOMIN_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/zoomIn_off.ico"
IDI_ZOOMOUT_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/zoomOut_off.ico"
IDI_VIEW_UD_DLG_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/userDefineDlg_off.ico"
IDI_PRINT_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/imprim_off.ico"
IDI_STARTRECORD_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/startrecord_off.ico"
IDI_STARTRECORD_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/startrecord_dis.ico"
IDI_STOPRECORD_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/stoprecord_off.ico"
IDI_STOPRECORD_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/stoprecord_dis.ico"
IDI_PLAYRECORD_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/playrecord_off.ico"
IDI_PLAYRECORD_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/playrecord_dis.ico"
IDI_SAVERECORD_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/saverecord_off.ico"
IDI_SAVERECORD_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/saverecord_dis.ico"
IDI_MMPLAY_DIS_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/playrecord_m_dis.ico"
IDI_MMPLAY_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/playrecord_m_off.ico"
IDI_VIEW_ALL_CHAR_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/allChars_off.ico"
IDI_VIEW_INDENT_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/indentGuide_off.ico"
IDI_VIEW_WRAP_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/wrap_off.ico"
IDI_SAVE_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/save_dis.ico"
IDI_SAVEALL_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/saveall_dis.ico"
IDI_CUT_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/cut_dis.ico"
IDI_COPY_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/dupli_dis.ico"
IDI_PASTE_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/paste_dis.ico"
IDI_UNDO_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/undo_dis.ico"
IDI_REDO_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/redo_dis.ico"
IDI_SYNCV_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/syncV_off.ico"
IDI_SYNCV_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/syncV_dis.ico"
IDI_SYNCH_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/syncH_off.ico"
IDI_SYNCH_DISABLE_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/syncH_dis.ico"
IDI_VIEW_DOC_MAP_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/docMap_off.ico"
IDI_VIEW_FUNCLIST_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/funcList_off.ico"
IDI_VIEW_FILEBROWSER_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/fileBrowser_off.ico"
IDI_VIEW_MONITORING_ICON_DM2 ICON "icons/darkMode/toolbar/filledFluentUI/monitoring_off.ico"
IDI_SAVED_ICON ICON "icons/saved.ico"
IDI_SAVED_DM_ICON ICON "icons/darkMode/tabbar/saved.ico"
IDI_SAVED_ALT_ICON ICON "icons/saved_alt.ico"
IDI_UNSAVED_ICON ICON "icons/unsaved.ico"
IDI_UNSAVED_DM_ICON ICON "icons/darkMode/tabbar/unsaved.ico"
IDI_UNSAVED_ALT_ICON ICON "icons/unsaved_alt.ico"
IDI_READONLY_ICON ICON "icons/readonly.ico"
IDI_READONLY_DM_ICON ICON "icons/darkMode/tabbar/readonly.ico"
IDI_READONLY_ALT_ICON ICON "icons/readonly_alt.ico"
IDI_MONITORING_ICON ICON "icons/monitoring.ico"
IDI_MONITORING_DM_ICON ICON "icons/darkMode/tabbar/monitoring.ico"
IDI_DELETE_ICON ICON "icons/delete.ico"
IDI_FIND_RESULT_ICON ICON "icons/findResult.ico"
@ -202,6 +307,10 @@ IDR_CLOSETAB BITMAP "icons/closeTabButton.bmp"
IDR_CLOSETAB_INACT BITMAP "icons/closeTabButton_inact.bmp"
IDR_CLOSETAB_HOVER BITMAP "icons/closeTabButton_hover.bmp"
IDR_CLOSETAB_PUSH BITMAP "icons/closeTabButton_push.bmp"
IDR_CLOSETAB_DM BITMAP "icons/darkMode/tabbar/closeTabButton.bmp"
IDR_CLOSETAB_INACT_DM BITMAP "icons/darkMode/tabbar/closeTabButton_inact.bmp"
IDR_CLOSETAB_HOVER_DM BITMAP "icons/darkMode/tabbar/closeTabButton_hover.bmp"
IDR_CLOSETAB_PUSH_DM BITMAP "icons/darkMode/tabbar/closeTabButton_push.bmp"
IDR_DOCMAP BITMAP "icons/docMap.bmp"
IDR_FUNC_LIST BITMAP "icons/functionList.bmp"
IDR_FILEBROWSER BITMAP "icons/fileBrowser.bmp"

View File

@ -589,7 +589,8 @@ void DockingCont::drawCaptionItem(DRAWITEMSTRUCT *pDrawItemStruct)
::DrawText(hDc, L"x", 1, &rc, DT_VCENTER | DT_CENTER | DT_SINGLELINE);
}
else {
else
{
HDC dcMem = ::CreateCompatibleDC(NULL);

View File

@ -49,6 +49,29 @@ void IconList::addIcon(int iconID) const
ImageList_AddIcon(_hImglst, hIcon);
::DestroyIcon(hIcon);
};
/*
bool IconList::addInvertIcon(int iconID) const
{
HICON hIcon = ::LoadIcon(_hInst, MAKEINTRESOURCE(iconID));
if (!hIcon)
throw std::runtime_error("IconList::addIcon : LoadIcon() function return null");
HICON hColorInvertedIcon = invertColour(hIcon);
if (hColorInvertedIcon)
ImageList_AddIcon(_hImglst, hColorInvertedIcon);
::DestroyIcon(hIcon);
return hColorInvertedIcon != 0;
}
HICON IconList::invertColour(HICON hIcon) const
{
// Light mode in, dark mode out
return NULL;
}
*/
void IconList::addIcon(HICON hIcon) const
{
@ -91,6 +114,12 @@ void ToolBarIcons::reInit(int size)
ImageList_SetIconSize(getDefaultLstSet2(), size, size);
ImageList_SetIconSize(getDisableLstSet2(), size, size);
ImageList_SetIconSize(getDefaultLstDM(), size, size);
ImageList_SetIconSize(getDisableLstDM(), size, size);
ImageList_SetIconSize(getDefaultLstSetDM2(), size, size);
ImageList_SetIconSize(getDisableLstSetDM2(), size, size);
for (size_t i = 0, len = _tbiis.size(); i < len; ++i)
{
if (_tbiis[i]._defaultIcon != -1)
@ -99,19 +128,31 @@ void ToolBarIcons::reInit(int size)
_iconListVector[HLIST_DISABLE].addIcon(_tbiis[i]._grayIcon);
_iconListVector[HLIST_DEFAULT2].addIcon(_tbiis[i]._defaultIcon2);
_iconListVector[HLIST_DISABLE2].addIcon(_tbiis[i]._grayIcon2);
_iconListVector[HLIST_DEFAULT_DM].addIcon(_tbiis[i]._defaultDarkModeIcon);
_iconListVector[HLIST_DISABLE_DM].addIcon(_tbiis[i]._grayDarkModeIcon);
_iconListVector[HLIST_DEFAULT_DM2].addIcon(_tbiis[i]._defaultDarkModeIcon2);
_iconListVector[HLIST_DISABLE_DM2].addIcon(_tbiis[i]._grayDarkModeIcon2);
}
}
// Add dynamic icons
// Add dynamic icons (from plugins)
for (auto i : _moreCmds)
{
_iconListVector[HLIST_DEFAULT].addIcon(i._hIcon);
_iconListVector[HLIST_DISABLE].addIcon(i._hIcon);
_iconListVector[HLIST_DEFAULT2].addIcon(i._hIcon);
_iconListVector[HLIST_DISABLE2].addIcon(i._hIcon);
_iconListVector[HLIST_DEFAULT_DM].addIcon(i._hIcon);
_iconListVector[HLIST_DISABLE_DM].addIcon(i._hIcon);
_iconListVector[HLIST_DEFAULT_DM2].addIcon(i._hIcon);
_iconListVector[HLIST_DISABLE_DM2].addIcon(i._hIcon);
}
}
void ToolBarIcons::create(HINSTANCE hInst, int iconSize)
{
_iconListVector.push_back(IconList());
@ -119,11 +160,22 @@ void ToolBarIcons::create(HINSTANCE hInst, int iconSize)
_iconListVector.push_back(IconList());
_iconListVector.push_back(IconList());
_iconListVector.push_back(IconList());
_iconListVector.push_back(IconList());
_iconListVector.push_back(IconList());
_iconListVector.push_back(IconList());
_iconListVector[HLIST_DEFAULT].init(hInst, iconSize);
_iconListVector[HLIST_DISABLE].init(hInst, iconSize);
_iconListVector[HLIST_DEFAULT2].init(hInst, iconSize);
_iconListVector[HLIST_DISABLE2].init(hInst, iconSize);
_iconListVector[HLIST_DEFAULT_DM].init(hInst, iconSize);
_iconListVector[HLIST_DISABLE_DM].init(hInst, iconSize);
_iconListVector[HLIST_DEFAULT_DM2].init(hInst, iconSize);
_iconListVector[HLIST_DISABLE_DM2].init(hInst, iconSize);
reInit(iconSize);
}

View File

@ -35,16 +35,21 @@ public :
};
HIMAGELIST getHandle() const {return _hImglst;};
void addIcon(int iconID) const;
//bool addInvertIcon(int iconID) const;
void addIcon(HICON hIcon) const;
bool changeIcon(int index, const TCHAR *iconLocation) const;
void addIcons(int size) const;
private :
HIMAGELIST _hImglst = nullptr;
HINSTANCE _hInst = nullptr;
int *_pIconIDArray = nullptr;
int _iconIDArraySize = 0;
int _iconSize = 0;
//HICON invertColour(HICON hIcon) const;
};
typedef struct
@ -57,6 +62,12 @@ typedef struct
int _defaultIcon2;
int _grayIcon2;
int _defaultDarkModeIcon;
int _grayDarkModeIcon;
int _defaultDarkModeIcon2;
int _grayDarkModeIcon2;
int _stdIcon;
} ToolBarButtonUnit;
@ -68,11 +79,16 @@ struct DynamicCmdIcoBmp {
typedef std::vector<ToolBarButtonUnit> ToolBarIconIDs;
// Light Mode list
const int HLIST_DEFAULT = 0;
const int HLIST_DISABLE = 1;
const int HLIST_DEFAULT2 = 2;
const int HLIST_DISABLE2 = 3;
// Dark Mode list
const int HLIST_DEFAULT_DM = 4;
const int HLIST_DISABLE_DM = 5;
const int HLIST_DEFAULT_DM2 = 6;
const int HLIST_DISABLE_DM2 = 7;
class ToolBarIcons
{
@ -99,6 +115,22 @@ public :
return _iconListVector[HLIST_DISABLE2].getHandle();
};
HIMAGELIST getDefaultLstDM() const {
return _iconListVector[HLIST_DEFAULT_DM].getHandle();
};
HIMAGELIST getDisableLstDM() const {
return _iconListVector[HLIST_DISABLE_DM].getHandle();
};
HIMAGELIST getDefaultLstSetDM2() const {
return _iconListVector[HLIST_DEFAULT_DM2].getHandle();
};
HIMAGELIST getDisableLstSetDM2() const {
return _iconListVector[HLIST_DISABLE_DM2].getHandle();
};
void resizeIcon(int size) {
reInit(size);
};

View File

@ -1112,13 +1112,14 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct, bool isDarkMode)
// 3 status for each inactive tab and selected tab close item :
// normal / hover / pushed
int idCloseImg;
bool isDM = NppDarkMode::isEnabled();
if (_isCloseHover && (_currentHoverTabItem == nTab) && (_whichCloseClickDown == -1)) // hover
idCloseImg = IDR_CLOSETAB_HOVER;
idCloseImg = isDM ? IDR_CLOSETAB_HOVER_DM : IDR_CLOSETAB_HOVER;
else if (_isCloseHover && (_currentHoverTabItem == nTab) && (_whichCloseClickDown == _currentHoverTabItem)) // pushed
idCloseImg = IDR_CLOSETAB_PUSH;
idCloseImg = isDM ? IDR_CLOSETAB_PUSH_DM : IDR_CLOSETAB_PUSH;
else
idCloseImg = isSelected?IDR_CLOSETAB:IDR_CLOSETAB_INACT;
idCloseImg = isSelected ? (isDM ? IDR_CLOSETAB_DM : IDR_CLOSETAB) : (isDM ? IDR_CLOSETAB_INACT_DM : IDR_CLOSETAB_INACT);
HDC hdcMemory;
hdcMemory = ::CreateCompatibleDC(hDC);

View File

@ -203,9 +203,6 @@ int ToolBar::getHeight() const
void ToolBar::reduce()
{
if (_state == TB_SMALL)
return;
int iconDpiDynamicalSize = NppParameters::getInstance()._dpiManager.scaleX(16);
_toolBarIcons.resizeIcon(iconDpiDynamicalSize);
setState(TB_SMALL);
@ -215,9 +212,6 @@ void ToolBar::reduce()
void ToolBar::enlarge()
{
if (_state == TB_LARGE)
return;
int iconDpiDynamicalSize = NppParameters::getInstance()._dpiManager.scaleX(32);
_toolBarIcons.resizeIcon(iconDpiDynamicalSize);
setState(TB_LARGE);
@ -227,9 +221,6 @@ void ToolBar::enlarge()
void ToolBar::reduceToSet2()
{
if (_state == TB_SMALL2)
return;
int iconDpiDynamicalSize = NppParameters::getInstance()._dpiManager.scaleX(16);
_toolBarIcons.resizeIcon(iconDpiDynamicalSize);
@ -240,9 +231,6 @@ void ToolBar::reduceToSet2()
void ToolBar::enlargeToSet2()
{
if (_state == TB_LARGE2)
return;
int iconDpiDynamicalSize = NppParameters::getInstance()._dpiManager.scaleX(32);
_toolBarIcons.resizeIcon(iconDpiDynamicalSize);
setState(TB_LARGE2);
@ -252,8 +240,6 @@ void ToolBar::enlargeToSet2()
void ToolBar::setToBmpIcons()
{
if (_state == TB_STANDARD)
return;
bool recreate = true;
setState(TB_STANDARD);
reset(recreate); //must recreate toolbar if setting to internal bitmaps
@ -310,16 +296,32 @@ void ToolBar::reset(bool create)
if (_state != TB_STANDARD) //If non standard icons, use custom imagelists
{
if (_state == TB_SMALL || _state == TB_LARGE)
{
if (NppDarkMode::isEnabled())
{
setDefaultImageListDM();
setDisableImageListDM();
}
else
{
setDefaultImageList();
setDisableImageList();
}
}
else
{
if (NppDarkMode::isEnabled())
{
setDefaultImageListDM2();
setDisableImageListDM2();
}
else
{
setDefaultImageList2();
setDisableImageList2();
}
}
}
else
{
//Else set the internal imagelist with standard bitmaps
@ -467,18 +469,21 @@ LRESULT CALLBACK RebarSubclass(
UNREFERENCED_PARAMETER(dwRefData);
UNREFERENCED_PARAMETER(uIdSubclass);
switch (uMsg) {
switch (uMsg)
{
case WM_ERASEBKGND:
if (NppDarkMode::isEnabled())
{
RECT rc;
GetClientRect(hWnd, &rc);
FillRect((HDC)wParam, &rc, NppDarkMode::getPureBackgroundBrush());
return 1;
return TRUE;
}
else {
else
{
break;
}
case WM_NCDESTROY:
RemoveWindowSubclass(hWnd, RebarSubclass, g_rebarSubclassID);
break;

View File

@ -130,6 +130,22 @@ private :
::SendMessage(_hSelf, TB_SETDISABLEDIMAGELIST, 0, reinterpret_cast<LPARAM>(_toolBarIcons.getDisableLstSet2()));
};
void setDefaultImageListDM() {
::SendMessage(_hSelf, TB_SETIMAGELIST, 0, reinterpret_cast<LPARAM>(_toolBarIcons.getDefaultLstDM()));
};
void setDisableImageListDM() {
::SendMessage(_hSelf, TB_SETDISABLEDIMAGELIST, 0, reinterpret_cast<LPARAM>(_toolBarIcons.getDisableLstDM()));
};
void setDefaultImageListDM2() {
::SendMessage(_hSelf, TB_SETIMAGELIST, 0, reinterpret_cast<LPARAM>(_toolBarIcons.getDefaultLstSetDM2()));
};
void setDisableImageListDM2() {
::SendMessage(_hSelf, TB_SETDISABLEDIMAGELIST, 0, reinterpret_cast<LPARAM>(_toolBarIcons.getDisableLstSetDM2()));
};
void reset(bool create = false);
void setState(toolBarStatusType state) {
_state = state;

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Some files were not shown because too many files have changed in this diff Show More