From: Vadim Zeitlin Date: Mon, 5 Mar 2012 13:00:57 +0000 (+0000) Subject: Override InheritAttributes() to do nothing in wxNonOwnedWindow. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/483bf4a6293f14516a8f77803b4965e957c0052e Override InheritAttributes() to do nothing in wxNonOwnedWindow. Non owner windows shouldn't inherit attributes from their parent. This wasn't a problem in wxMSW where InheritAttributes() was never called for them but was in wxGTK (and possibly other ports) where dialogs inherited font from their parent. Closes #2766. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/nonownedwnd.h b/include/wx/nonownedwnd.h index 536b55cef4..696edb5e9b 100644 --- a/include/wx/nonownedwnd.h +++ b/include/wx/nonownedwnd.h @@ -69,6 +69,13 @@ public: // client area origin so simply do nothing here. } + virtual void InheritAttributes() + { + // Non owned windows don't inherit attributes from their parent window + // (if the parent frame is red, it doesn't mean that all dialogs shown + // by it should be red as well), so don't do anything here neither. + } + protected: virtual bool DoClearShape() {