Make message box title bar dark when using dark mode
Unfortunately the message box contents itself remains light, but at least make its title bar follow the theme.
This commit is contained in:
parent
a14bcdb5a4
commit
9ca577f6d0
1 changed files with 21 additions and 0 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include "wx/ptr_scpd.h"
|
||||
#include "wx/dynlib.h"
|
||||
#include "wx/msw/private/button.h"
|
||||
#include "wx/msw/private/darkmode.h"
|
||||
#include "wx/msw/private/metrics.h"
|
||||
#include "wx/msw/private/msgdlg.h"
|
||||
#include "wx/modalhook.h"
|
||||
|
|
@ -599,6 +600,24 @@ void wxMessageDialog::DoCentre(int dir)
|
|||
// Helpers of the wxMSWMessageDialog namespace
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
HRESULT CALLBACK
|
||||
wxTaskDialogCallback(HWND hwnd, UINT msg, WPARAM, LPARAM, LONG_PTR)
|
||||
{
|
||||
switch ( msg )
|
||||
{
|
||||
case TDN_DIALOG_CONSTRUCTED:
|
||||
wxMSWDarkMode::EnableForTLW(hwnd);
|
||||
break;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
wxMSWTaskDialogConfig::wxMSWTaskDialogConfig(const wxMessageDialogBase& dlg)
|
||||
: buttons(new TASKDIALOG_BUTTON[MAX_BUTTONS])
|
||||
{
|
||||
|
|
@ -747,6 +766,8 @@ void wxMSWTaskDialogConfig::MSWCommonTaskDialogInit(TASKDIALOGCONFIG &tdc)
|
|||
|
||||
AddTaskDialogButton(tdc, IDHELP, 0 /* not used */, btnHelpLabel);
|
||||
}
|
||||
|
||||
tdc.pfCallback = wxTaskDialogCallback;
|
||||
}
|
||||
|
||||
void wxMSWTaskDialogConfig::AddTaskDialogButton(TASKDIALOGCONFIG &tdc,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue