-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Description of the Issue
Dark mode is ignored (i.e., lack of any specific code for handling it) in the 4.3 version of the demo plugin template. Thus when doing some fairly simple UI development in a plugin using the template, not all UI elements appear "dark".
Ideally, a plugin developer should not be impacted (too much) to provide a fully dark-mode enabled plugin, certainly not for a simple UI case like provided below.
Steps to Reproduce the Issue
- Obtain and build v. 4.3 of the plugin demo
- Install the plugin demo DLL under Notepad++ 8.5.2 (set with Dark Mode enabled; Windows itself in non-dark mode)
- Run Notepad++ and activate the "Dockable Dialog Demo" feature of the plugin; observe all controls are "dark":

- Change the code to add a groupbox control and then re-parent the edit box control for line number input to be the groupbox via these steps:
- add
GROUPBOX "",IDC_GROUPBOX,0,0,180,180togoLine.rc - add
#define IDC_GROUPBOX (IDD_PLUGINGOLINE_DEMO + 6)toresource.h - add this case into
GotoLineDlg.cpp(at the obvious spot):
case WM_INITDIALOG:
{
HWND gbHwnd = ::GetDlgItem(_hSelf, IDC_GROUPBOX);
RECT gbRect;
::GetWindowRect(gbHwnd, &gbRect);
HWND childHwnd = ::GetDlgItem(_hSelf, ID_GOLINE_EDIT);
RECT childRect;
::GetWindowRect(childHwnd, &childRect);
int x = childRect.left - gbRect.left;
int y = childRect.top - gbRect.top;
int w = childRect.right - childRect.left;
int h = childRect.bottom - childRect.top;
::SetParent(childHwnd, gbHwnd);
::MoveWindow(childHwnd, x, y, w, h, TRUE);
return TRUE;
}
- Build the new code and run it; observe the "Go To Line #" dockable panel's edit box control for line number input.
Expected Behavior
I expected the edit box for the line number input to be "dark".
Actual Behavior
The edit box for the line number input was "bright white":
Debug Information
plugin demo v.4.3
Running under:
Notepad++ v8.5.2 (64-bit)
Build time : Apr 4 2023 - 19:55:32
Path : W:\npp.misc_NoBackup\Releases\npp.8.5.2\npp.8.5.2.portable.x64\notepad++.exe
Command Line : -titleAdd="8.5.2 64-bit" -multiInst
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 21H2
OS Build : 19044.2728
Current ANSI codepage : 1252
Plugins :
ColumnsPlusPlus (0.2.0.6)
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4)
NppPluginDemo (4.3)
PythonScript (2)
