51 Commits

Author SHA1 Message Date
Don Ho
3bca7bf278 Use L"" instead of TEXT("") - Part 1 2024-07-18 05:26:20 +02:00
Don Ho
0858dfa4af Use GetFileAttributes instead of PathFileExists
Ref: https://github.com/notepad-plus-plus/nppShell/pull/64#discussion_r1664890166
Ref: https://devblogs.microsoft.com/oldnewthing/20071023-00/?p=24713

Fix #14839, close #15400
2024-07-14 22:50:00 +02:00
ozone10
e7e88a380a Add "Show All Character" context menu on toolbar button
Fix #14832, close #15235
2024-06-07 00:47:31 +02:00
ozone10
fedaabf0f8 Fix toolbar pressed button visual glitch in dark mode
Use custom draw for main toolbar in dark mode.

Fix #15225, close #15226
2024-06-01 00:58:08 +02:00
Don Ho
c823ca8150 Adapt new DPI support for toolbar
ref #14959

Close #15044
2024-04-25 02:59:33 +02:00
ozone10
ebe7648ee1 Code improvement, remove unnecessary part
Fix pedantic warnings, add initializers.

Close #12093
2022-09-07 17:49:56 +02:00
Don Ho
fa3ba7e389 Fix customizing toolbar icon messed with dark mode
Ref:
d85b9a7464 (commitcomment-74498214)
2022-05-27 04:06:11 +02:00
Don Ho
d85b9a7464 Make toolbar icons customizale
This is the enhancement of a long time forgotten feature.

To override the current toolbar icons, we needs 2 things: "toolbarIcons.xml" file and one icons set.
Here are the instructions to customize toolbar icons:

1. Put the file "toolbarIcons.xml" (Note 1) in the same folder of "config.xml" file (Note 2).
2. Create a new folder "toolbarIcons" in the folder where you put "toolbarIcons.xml" file.
3. Edit the file "toolbarIcons.xml": put the icon set name you want in "icoFolderName" attribute (Note 3).
   for example: `<ToolBarIcons icoFolderName="myAwesomeIcons" />`
4. Go into "toolbarIcons" folder and create a new folder with the exact name of the icon set name you provided in "icoFolderName".
5. Put all your customized icons into "[toolbarIcons.xml's folder]\toolbarIcons\myAwesomeIcons\".
6. Now it's the magic moment: Relaunch Notepad++ and you'll see your icon set instead of the default icons.

Note:
1. The content of "toolbarIcons.xml" is following:
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
    <ToolBarIcons icoFolderName="nppLagacyIcons" />
</NotepadPlus>
```
2. If you find the file "doLocalConf.xml" in the Notepad++ installed directory, you will find the "config.xml" in Notepad++ installed directory. Otherwise it should be in "%APPDATA%\Notepad++\" directory.
3. if "icoFolderName" value is an emptty string, the path of icons will be in "[toolbarIcons.xml's folder]\toolbarIcons\default\" folder.

Each replacing icon (45 icons) has the fixed and specific name:

| index |  Normal icon             |  Disabled icon                  |
|-------|--------------------------|---------------------------------|
|1      |  new.ico                 |                                 |
|2      |  open.ico                |                                 |
|3      |  save.ico                |  save_disabled.ico              |
|4      |  save-all.ico            |  save-all_disabled.ico          |
|5      |  close.ico               |                                 |
|6      |  close-all.ico           |                                 |
|7      |  print.ico               |                                 |
|8      |  cut.ico                 |  cut_disabled.ico               |
|9      |  copy.ico                |  copy_disabled.ico              |
|10     |  paste.ico               |  paste_disabled.ico             |
|11     |  undo.ico                |  undo_disabled.ico              |
|12     |  redo.ico                |  redo_disabled.ico              |
|13     |  find.ico                |                                 |
|14     |  replace.ico             |                                 |
|15     |  zoom-in.ico             |                                 |
|16     |  zoom-out.ico            |                                 |
|17     |  sync-vertical.ico       |                                 |
|18     |  sync-horizontal.ico     |                                 |
|19     |  word-wrap.ico           |                                 |
|20     |  all-chars.ico           |                                 |
|21     |  indent-guide.ico        |                                 |
|22     |  udl-dlg.ico             |                                 |
|23     |  doc-map.ico             |                                 |
|24     |  doc-list.ico            |                                 |
|25     |  function-list.ico       |                                 |
|26     |  folder-as-workspace.ico |                                 |
|27     |  monitoring.ico          |  monitoring_disabled.ico        |
|28     |  record.ico              |  record_disabled.ico            |
|29     |  stop-record.ico         |  stop-record_disabled.ico       |
|30     |  playback.ico            |  playback_disabled.ico          |
|31     |  playback-multiple.ico   |  playback-multiple_disabled.ico |
|32     |  save-macro.ico          |  save-macro_disabled.ico        |

It's not necessary to have all complete set (45 icons). The absent icons won't just be substituted.

Fix #9913
2022-05-24 17:57:38 +02:00
Don Ho
785453147b Inialize all memebers of struct (instead of its 1st member) to zero
The curly brace initiator in C/C++ is quite confusing (at least to me).
The C style array uses {0} for initializing all the array to 0,
whereas C++ struct uses {0} for initializing only the 1st member's value to 0.
If we want to set all members' value in a struct to 0, we should use {} instread of {0}.

This commit fix the error which initialize only the 1st member's value to 0 in the structures.

Ref:
1. https://docs.microsoft.com/en-us/cpp/cpp/initializing-classes-and-structs-without-constructors-cpp?view=msvc-170
2. https://en.cppreference.com/w/c/language/struct_initialization
2022-02-09 16:41:56 +01:00
Don Ho
5d086f93a8 Workaround Microsoft dark mode API bug of Windows 11
Notepad++ dark mode works fine under Microsft Windows 7, 8, 8.1 & 10.
Under Windows 11 while Notepad++ being switched into dark mode,
the hightlighting (background) of toolbar's hot-track icons remains in light mode.
Hence this workaround to remedy Notepad++ dark mode visual glitchy due to the bug of Windows 11.

Fix #10510, close #10685
2021-10-18 00:30:14 +02:00
Don Ho
302bab894f Make plugins' toolbar icons display in light/dark mode
The plugins' toolbar icons can be displayed in both light/dark mode by using their original icons.
Though using new API NPPM_ADDTOOLBARICON_FORDARKMODE to have better look & feel is recommanded.

Fix #9959, fix #10388, fix #9809
2021-08-16 02:12:03 +02:00
Don Ho
19f40fdeae Fix 2 panels' toolbar icons display issue under high DPI
Improve Function list & Folder as Workspace toolbar icons display under high DPI.
2021-07-30 15:59:27 +02:00
ozone10
467870d66e Add DarkMode Tooltips
Fix #9962, close #9963
2021-06-13 00:35:12 +02:00
Don HO
8a898bae3f Add new API NPPM_ADDTOOLBARICON_FORDARKMODE for darkmode
Usage:
void NPPM_ADDTOOLBARICON_FORDARKMODE(UINT funcItem[X]._cmdID, toolbarIconsWithDarkMode iconHandles)

This new API NPPM_ADDTOOLBARICON_FORDARKMODE is for replacing obsolete NPPM_ADDTOOLBARICON which doesn't support the dark mode.
2 formats / 3 icons are needed:  1 * BMP + 2 * ICO
All 3 handles below should be set so the icon will be displayed correctly if toolbar icon sets are changed by users, also in dark mode.
	struct toolbarIconsWithDarkMode {
		HBITMAP	hToolbarBmp;
		HICON	hToolbarIcon;
		HICON	hToolbarIconDarkMode;
	};

Close #9928
2021-06-01 01:36:07 +02:00
Don HO
46b3e3c7b2 Fix wrong plugin toolbar icon display if the ICO format is absent
An empty icon will be displayed after this fix.
2021-05-29 16:56:02 +02:00
Don HO
9a2dcaa5f8 Fix plugin icons added on toolbar not taking effect for Fluent UI icon sets
NPPM_ADDTOOLBARICON take structure
		struct toolbarIcons {
			HBITMAP	hToolbarBmp;
			HICON	hToolbarIcon;
		};
as argument, both hToolbarBmp & hToolbarIcon should not be null to take effect.
2021-05-22 01:49:50 +02:00
Don HO
bae09252c7 Fix build error 2021-05-10 12:56:52 +02:00
Don HO
db27172ca8 Add Fluent UI icons for Dark mode
Add Fluent UI icons for Dark mode in the toolbar & the tabbar

Fix #9742, close #9831
2021-05-09 17:38:54 +02:00
Don HO
dc34284146 Make toolbar compatible with current plugins 2021-05-05 16:47:06 +02:00
Don HO
7d25394244 Add new toolbar icons (Fluent UI)
1. Remove obsolete icon set.
2. Add both Fluent UI & Filled Fluent UI icon sets.
3. Refactoring toolbar code

Fix #9742, close #9808
2021-05-05 14:39:27 +02:00
Adam D. Walling
5a3bf49c86 Add Dark Mode for not attracting bugs
Toolbar, status bar, tab bar, menu bar, dark scrollbar, handle switching between light and dark, docking splitters and headers, flicker fixes. Minor tweaks to DarkMode.h. Mostly handles the dark mode request for the main interface for #7692 and also follows the windows system theme settings like #9183.

Fix #9183, fix #7692, close #9587
2021-04-23 16:22:57 +02:00
Don HO
ab5c1d3e2a
Upgrade Notepad++ License
Update GPL version from v2 to v3.

Fix #9425, close #9441
2021-01-24 01:51:19 +01:00
Don HO
ade01204c8
Fix minor coding error & remove unused variables 2020-05-10 05:19:08 +02:00
Don HO
3de506bf48
Update copyright
Close #5919
2020-04-04 23:03:18 +02:00
Don HO
6e6341cc61
Make some codes conform to the defined coding style 2020-01-28 02:20:44 +01:00
Don HO
06db9ee338
Code improvement for NppParameters 2019-08-14 22:13:24 +02:00
Don HO
52a4e21af5
Remove ugly coding style 2019-03-16 05:33:50 +01:00
Don HO
5356f648c2
Remove some ugly coding styles 2019-03-13 02:02:35 +01:00
Don HO
385746de01 Rename variables & clean up 2017-07-27 10:30:53 +02:00
Don HO
37ed299743 Lost in Translation 2 2016-08-10 00:22:45 +02:00
Don HO
30bd15f04a Use C++ conversion instead of C style cast 2016-07-23 11:37:58 +02:00
Don HO
797765173d Improve code quality by using static code analysis tool (cppchecker) 2016-07-18 02:08:29 +02:00
Don HO
64d7535be1 x64 ready
1. Remove all warning while compiling in x64
2. Treat warning as error (W4) while compiling in x64
2016-06-05 20:30:22 +02:00
Markus Heidelberg
715a64a32a Make GCC/MinGW build work again and support cross-building under Linux
Close #1229, Fixes #385
Only build errors are fixed, compile warnings are left alone. To reduce
the number of changes, even the compiler option "-fpermissive" has been
used to downgrade several errors to warnings.
2015-12-15 17:10:46 +01:00
Rikk
dfc24b1919 Toolbar: properly refresh when switching over small/big icons (fixes #673, closes #692) 2015-08-10 10:43:13 +02:00
Ricardo
4d2090298e Disable the unused gripper of toolbar (fixes #633, closes #667) 2015-08-07 13:46:11 +02:00
Don Ho
246c8bd168 [UPDATE] Unprecompile headers (part 3) 2015-06-02 18:01:47 +02:00
Don Ho
b7edd3c8e2 [ENHANCEMENT] (Author: Mike Cowperthwaite) Enhance Incremental search. (part 1/2)
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1334 f5eea248-9336-0410-98b8-ebc06183d4e3
2015-02-06 02:29:07 +00:00
Don Ho
7edbd55348 [NEW_FEATURE] Make Notepad++ DPI-aware.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1172 f5eea248-9336-0410-98b8-ebc06183d4e3
2014-02-11 00:26:24 +00:00
Don Ho
641c1af0e1 [ENHANCEMENT] change the icon buttons of functionlist.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1136 f5eea248-9336-0410-98b8-ebc06183d4e3
2013-10-20 21:41:22 +00:00
Don Ho
6264ef03d0 [ENHANCEMENT] Code optimization.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1073 f5eea248-9336-0410-98b8-ebc06183d4e3
2013-07-08 00:12:50 +00:00
Don Ho
a896922136 [UPDATE] Update the GPL of all project source code to avoid the bundle version made by the tiers sites : cnet, softonic and 01net.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@896 f5eea248-9336-0410-98b8-ebc06183d4e3
2012-04-15 16:54:38 +00:00
Don Ho
0598f46e9f [ENHANCE] Force incremental search bar use the gray background.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@847 f5eea248-9336-0410-98b8-ebc06183d4e3
2011-12-10 09:24:45 +00:00
Don Ho
52539b01b9 [CLEAN] throw runtime_error instead of int.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@635 f5eea248-9336-0410-98b8-ebc06183d4e3
2010-05-25 23:41:58 +00:00
Don Ho
2e54127036 [UPDATE] refactoring (in progress).
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@624 f5eea248-9336-0410-98b8-ebc06183d4e3
2010-03-16 22:32:58 +00:00
Don Ho
0c490dc55a [ENHANCE] Thanks to Jocelyn Legault (precompiled headers), the build time is sped up.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@529 f5eea248-9336-0410-98b8-ebc06183d4e3
2009-09-04 00:10:01 +00:00
Don Ho
659a938735 [BUG_FIXED] FIX toolbar bug : make toolbar chevron work.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@515 f5eea248-9336-0410-98b8-ebc06183d4e3
2009-08-03 23:01:20 +00:00
Don Ho
05bb2a8f77 [ENHANCE] Enhance the source code compiling by /W4 /WX
.

Signed-off-by: Don HO <don.h@free.fr>

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@505 f5eea248-9336-0410-98b8-ebc06183d4e3
2009-07-04 11:33:17 +00:00
Don Ho
e7e4c9840e [BUG_FIXED] Fix no tool bar bug under w2k.
[BUG_FIXED] Fix "In selection" bug in Find Replace features.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@495 f5eea248-9336-0410-98b8-ebc06183d4e3
2009-06-18 20:11:23 +00:00
Don Ho
5b5c317872 [RELEASE] v5.4.3 release.
[BUG_FIXED] Fix clickable link styling bug.
[BUG_FIXED] Fix vs2008 compiling issue - toolbar always hidden.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@492 f5eea248-9336-0410-98b8-ebc06183d4e3
2009-06-07 01:49:42 +00:00