From ff9f7a12ff963859ef4928809f2296fa4fc4afd6 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 11 Sep 2004 07:42:44 +0000 Subject: [PATCH] support for sys-opted window variant git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/window.h | 4 ++++ src/common/wincmn.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/wx/window.h b/include/wx/window.h index 3a0b1e7d52..8252941296 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -102,6 +102,10 @@ enum wxWindowVariant wxWINDOW_VARIANT_MAX }; +#if wxUSE_SYSTEM_OPTIONS + #define wxWINDOW_DEFAULT_VARIANT wxT("window-default-variant") +#endif + // ---------------------------------------------------------------------------- // (pseudo)template list classes // ---------------------------------------------------------------------------- diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index c4fba2a8ab..f2b0a67a0b 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -77,6 +77,10 @@ #include "wx/caret.h" #endif // wxUSE_CARET +#if wxUSE_SYSTEM_OPTIONS + #include "wx/sysopt.h" +#endif + // ---------------------------------------------------------------------------- // static data // ---------------------------------------------------------------------------- @@ -193,6 +197,12 @@ wxWindowBase::wxWindowBase() m_maxVirtualHeight = wxDefaultCoord; m_windowVariant = wxWINDOW_VARIANT_NORMAL; +#if wxUSE_SYSTEM_OPTIONS + if ( wxSystemOptions::HasOption(wxWINDOW_DEFAULT_VARIANT) ) + { + m_windowVariant = (wxWindowVariant) wxSystemOptions::GetOptionInt( wxWINDOW_DEFAULT_VARIANT ) ; + } +#endif // Whether we're using the current theme for this window (wxGTK only for now) m_themeEnabled = false;