Fix wxMSW build with wxUSE_UXTHEME==0

Make wxUxThemeIsActive() available even in this case to fix compilation
in some places and add the unavoidable preprocessor checks in other
ones.

Closes #18207.
This commit is contained in:
Vadim Zeitlin
2018-12-08 20:17:57 +01:00
parent fd5c62bc41
commit 089eeea3ef
9 changed files with 43 additions and 29 deletions

View File

@@ -37,9 +37,7 @@
#include "wx/combo.h"
#include "wx/msw/registry.h"
#if wxUSE_UXTHEME
#include "wx/msw/uxtheme.h"
#endif
#include "wx/msw/dc.h"
#define NATIVE_TEXT_INDENT_XP 4
@@ -87,7 +85,6 @@ bool wxComboCtrl::Create(wxWindow *parent,
if ( !border )
{
#if wxUSE_UXTHEME
if ( wxUxThemeIsActive() )
{
// For XP, have 1-width custom border, for older version use sunken
@@ -95,7 +92,6 @@ bool wxComboCtrl::Create(wxWindow *parent,
m_widthCustomBorder = 1;
}
else
#endif
border = wxBORDER_SUNKEN;
style = (style & ~(wxBORDER_MASK)) | border;
@@ -112,10 +108,8 @@ bool wxComboCtrl::Create(wxWindow *parent,
name) )
return false;
#if wxUSE_UXTHEME
if ( wxUxThemeIsActive() && ::wxGetWinVersion() >= wxWinVersion_Vista )
m_iFlags |= wxCC_BUTTON_STAYS_DOWN |wxCC_BUTTON_COVERS_BORDER;
#endif
if ( style & wxCC_STD_BUTTON )
m_iFlags |= wxCC_POPUP_ON_MOUSE_UP;