Skip to content

Commit

Permalink
Merge pull request bruderstein#36 from funap/feature/support_fluent_i…
Browse files Browse the repository at this point in the history
…cons

add support fluent ui icons
  • Loading branch information
funap authored Jul 11, 2021
2 parents cd0037d + bf78c4f commit 569d6e0
Show file tree
Hide file tree
Showing 8 changed files with 632 additions and 592 deletions.
1,164 changes: 600 additions & 564 deletions Common/Ccpp/Notepad_plus_msgs.h

Large diffs are not rendered by default.

Binary file added Explorer/res/fluent_explorer.ico
Binary file not shown.
Binary file added Explorer/res/fluent_explorer_dark.ico
Binary file not shown.
Binary file added Explorer/res/fluent_faves.ico
Binary file not shown.
Binary file added Explorer/res/fluent_faves_dark.ico
Binary file not shown.
22 changes: 14 additions & 8 deletions Explorer/src/Explorer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ FuncItem funcItem[] = {
/* 15 */{ L"&Help...", openHelpDlg, 0, false, nullptr},
};

toolbarIcons g_TBExplorer;
toolbarIcons g_TBFaves;
toolbarIconsWithDarkMode g_TBExplorer;
toolbarIconsWithDarkMode g_TBFaves;

/* create classes */
ExplorerDialog explorerDlg;
Expand Down Expand Up @@ -299,12 +299,18 @@ extern "C" __declspec(dllexport) void beNotified(SCNotification *notifyCode)
if (notifyCode->nmhdr.hwndFrom == nppData._nppHandle) {
if (notifyCode->nmhdr.code == NPPN_TBMODIFICATION) {
/* change menu language */
NLChangeNppMenu((HINSTANCE)g_hModule, nppData._nppHandle, PLUGIN_NAME, funcItem, _countof(funcItem));

g_TBExplorer.hToolbarBmp = (HBITMAP)::LoadImage((HINSTANCE)g_hModule, MAKEINTRESOURCE(IDB_TB_EXPLORER), IMAGE_BITMAP, 0, 0, (LR_DEFAULTSIZE | LR_LOADMAP3DCOLORS));
g_TBFaves.hToolbarBmp = (HBITMAP)::LoadImage((HINSTANCE)g_hModule, MAKEINTRESOURCE(IDB_TB_FAVES), IMAGE_BITMAP, 0, 0, (LR_DEFAULTSIZE | LR_LOADMAP3DCOLORS));
::SendMessage(nppData._nppHandle, NPPM_ADDTOOLBARICON, (WPARAM)funcItem[DOCKABLE_EXPLORER_INDEX]._cmdID, (LPARAM)&g_TBExplorer);
::SendMessage(nppData._nppHandle, NPPM_ADDTOOLBARICON, (WPARAM)funcItem[DOCKABLE_FAVORTIES_INDEX]._cmdID, (LPARAM)&g_TBFaves);
const HINSTANCE& hInst = reinterpret_cast<const HINSTANCE>(g_hModule);
NLChangeNppMenu(hInst, nppData._nppHandle, PLUGIN_NAME, funcItem, _countof(funcItem));

g_TBExplorer.hToolbarBmp = (HBITMAP) ::LoadImage(hInst, MAKEINTRESOURCE(IDB_TB_EXPLORER), IMAGE_BITMAP, 0, 0, (LR_DEFAULTSIZE | LR_LOADMAP3DCOLORS));
g_TBExplorer.hToolbarIcon = (HICON) ::LoadImage(hInst, MAKEINTRESOURCE(IDI_TB_FLUENT_EXPLORER), IMAGE_ICON, 0, 0, (LR_DEFAULTSIZE | LR_LOADMAP3DCOLORS));
g_TBExplorer.hToolbarIconDarkMode = (HICON) ::LoadImage(hInst, MAKEINTRESOURCE(IDI_TB_FLUENT_EXPLORER_DARKMODE), IMAGE_ICON, 0, 0, (LR_DEFAULTSIZE | LR_LOADMAP3DCOLORS));
::SendMessage(nppData._nppHandle, NPPM_ADDTOOLBARICON_FORDARKMODE, (WPARAM)funcItem[DOCKABLE_EXPLORER_INDEX]._cmdID, (LPARAM)&g_TBExplorer);

g_TBFaves.hToolbarBmp = (HBITMAP) ::LoadImage(hInst, MAKEINTRESOURCE(IDB_TB_FAVES), IMAGE_BITMAP, 0, 0, (LR_DEFAULTSIZE | LR_LOADMAP3DCOLORS));
g_TBFaves.hToolbarIcon = (HICON) ::LoadImage(hInst, MAKEINTRESOURCE(IDI_TB_FLUENT_FAVES), IMAGE_ICON, 0, 0, (LR_DEFAULTSIZE | LR_LOADMAP3DCOLORS));
g_TBFaves.hToolbarIconDarkMode = (HICON) ::LoadImage(hInst, MAKEINTRESOURCE(IDI_TB_FLUENT_FAVES_DARKMODE), IMAGE_ICON, 0, 0, (LR_DEFAULTSIZE | LR_LOADMAP3DCOLORS));
::SendMessage(nppData._nppHandle, NPPM_ADDTOOLBARICON_FORDARKMODE, (WPARAM)funcItem[DOCKABLE_FAVORTIES_INDEX]._cmdID, (LPARAM)&g_TBFaves);
}
if (notifyCode->nmhdr.code == NPPN_READY) {
explorerDlg.initFinish();
Expand Down
34 changes: 14 additions & 20 deletions Explorer/src/ExplorerDialog.rc
Original file line number Diff line number Diff line change
Expand Up @@ -234,26 +234,20 @@ END

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_PARENTFOLDER ICON "..\\res\\parent.ico"

IDI_FOLDER ICON "..\\res\\folder.ico"

IDI_FILE ICON "..\\res\\file.ico"

IDI_WEB ICON "..\\res\\web.ico"

IDI_SESSION ICON "..\\res\\session.ico"

IDI_GROUP ICON "..\\res\\group.ico"

IDI_EXPLORE ICON "..\\res\\explore.ico"

IDI_HEART ICON "..\\res\\Heart.ico"

IDI_WARN_SESSION ICON "..\\res\\warnsession.ico"

IDI_MISSING_FILE ICON "..\\res\\missingfile.ico"

IDI_PARENTFOLDER ICON "..\\res\\parent.ico"
IDI_FOLDER ICON "..\\res\\folder.ico"
IDI_FILE ICON "..\\res\\file.ico"
IDI_WEB ICON "..\\res\\web.ico"
IDI_SESSION ICON "..\\res\\session.ico"
IDI_GROUP ICON "..\\res\\group.ico"
IDI_EXPLORE ICON "..\\res\\explore.ico"
IDI_HEART ICON "..\\res\\Heart.ico"
IDI_WARN_SESSION ICON "..\\res\\warnsession.ico"
IDI_MISSING_FILE ICON "..\\res\\missingfile.ico"
IDI_TB_FLUENT_EXPLORER ICON "..\\res\\fluent_explorer.ico"
IDI_TB_FLUENT_EXPLORER_DARKMODE ICON "..\\res\\fluent_explorer_dark.ico"
IDI_TB_FLUENT_FAVES ICON "..\\res\\fluent_faves.ico"
IDI_TB_FLUENT_FAVES_DARKMODE ICON "..\\res\\fluent_faves_dark.ico"

/////////////////////////////////////////////////////////////////////////////
//
Expand Down
4 changes: 4 additions & 0 deletions Explorer/src/ExplorerResource.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define IDI_EXPLORE 111
#define IDI_WARN_SESSION 112
#define IDI_MISSING_FILE 113
#define IDI_TB_FLUENT_EXPLORER 114
#define IDI_TB_FLUENT_EXPLORER_DARKMODE 115
#define IDI_TB_FLUENT_FAVES 116
#define IDI_TB_FLUENT_FAVES_DARKMODE 117


/* Toolbar icons */
Expand Down

0 comments on commit 569d6e0

Please sign in to comment.