Disable AUI themes when using dark mode under MSW
There doesn't seem to be any way to use the appropriate colours via themes API in the dark mode, so just disable using it and draw everything ourselves when it's on.
This commit is contained in:
parent
79b8639a32
commit
521e29de7b
2 changed files with 5 additions and 2 deletions
|
|
@ -22,10 +22,12 @@
|
|||
#include "wx/aui/framemanager.h"
|
||||
#include "wx/msw/uxtheme.h"
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/msw/private/darkmode.h"
|
||||
|
||||
wxAuiMSWToolBarArt::wxAuiMSWToolBarArt()
|
||||
{
|
||||
if ( wxUxThemeIsActive() )
|
||||
// Theme colours don't work in dark theme, so don't use them in this case.
|
||||
if ( wxUxThemeIsActive() && !wxMSWDarkMode::IsActive() )
|
||||
{
|
||||
m_themed = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include "wx/aui/auibook.h"
|
||||
#include "wx/msw/uxtheme.h"
|
||||
#include "wx/msw/private.h"
|
||||
#include "wx/msw/private/darkmode.h"
|
||||
#include "wx/renderer.h"
|
||||
|
||||
wxAuiMSWTabArt::wxAuiMSWTabArt()
|
||||
|
|
@ -27,7 +28,7 @@ wxAuiMSWTabArt::wxAuiMSWTabArt()
|
|||
m_closeBtnSize = wxDefaultSize;
|
||||
m_maxTabHeight = 0;
|
||||
|
||||
m_themed = wxUxThemeIsActive();
|
||||
m_themed = wxUxThemeIsActive() && !wxMSWDarkMode::IsActive();
|
||||
}
|
||||
|
||||
wxAuiMSWTabArt::~wxAuiMSWTabArt()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue