Fix incosistent key accelerator cue for groupbox in dark mode

Fix #13597, close #13598
pull/13604/head
ozone10 2023-04-25 18:21:55 +02:00 committed by Don Ho
parent 80b34f0adf
commit c585a1ab08
3 changed files with 25 additions and 0 deletions

View File

@ -1313,6 +1313,11 @@ namespace NppDarkMode
DWORD textFlags = isCenter ? DT_CENTER : DT_LEFT;
if(::SendMessage(hwnd, WM_QUERYUISTATE, 0, 0) != NULL)
{
textFlags |= DT_HIDEPREFIX;
}
DrawThemeTextEx(buttonData.hTheme, hdc, BP_GROUPBOX, iStateID, szText, -1, textFlags | DT_SINGLELINE, &rcText, &dtto);
}

View File

@ -294,6 +294,16 @@ intptr_t CALLBACK RunDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam
return TRUE;
}
case WM_CHANGEUISTATE:
{
if (NppDarkMode::isEnabled() && !NppDarkMode::isWindows11())
{
redrawDlgItem(IDC_MAINTEXT_STATIC);
}
return FALSE;
}
case WM_COMMAND:
{
switch (wParam)

View File

@ -103,6 +103,16 @@ intptr_t CALLBACK RunMacroDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM l
return TRUE;
}
case WM_CHANGEUISTATE:
{
if (NppDarkMode::isEnabled() && !NppDarkMode::isWindows11())
{
redrawDlgItem(IDC_MACRO2RUN_STATIC);
}
return FALSE;
}
case WM_COMMAND:
{
switch (wParam)