Make background of book controls in wxMSW be the same as parent
This improves their appearance especially when they're used as children of
wxNotebook, which uses a different background colour than plain wxPanel by
default.
This generalizes what was already done for wxChoicebook in 6cab632f
(see #12503) to all book controls.
Closes #16878.
This commit is contained in:
committed by
Vadim Zeitlin
parent
059704edc1
commit
015ffbb0ef
@@ -311,6 +311,11 @@ protected:
|
|||||||
// Lay out controls
|
// Lay out controls
|
||||||
virtual void DoSize();
|
virtual void DoSize();
|
||||||
|
|
||||||
|
// It is better to make this control transparent so that by default the controls on
|
||||||
|
// its pages are on the same colour background as the rest of the window. If the user
|
||||||
|
// prefers a coloured background they can set the background colour on the page panel
|
||||||
|
virtual bool HasTransparentBackground() wxOVERRIDE { return true; }
|
||||||
|
|
||||||
// This method also invalidates the size of the controller and should be
|
// This method also invalidates the size of the controller and should be
|
||||||
// called instead of just InvalidateBestSize() whenever pages are added or
|
// called instead of just InvalidateBestSize() whenever pages are added or
|
||||||
// removed as this also affects the controller
|
// removed as this also affects the controller
|
||||||
|
@@ -79,11 +79,6 @@ public:
|
|||||||
// returns the choice control
|
// returns the choice control
|
||||||
wxChoice* GetChoiceCtrl() const { return (wxChoice*)m_bookctrl; }
|
wxChoice* GetChoiceCtrl() const { return (wxChoice*)m_bookctrl; }
|
||||||
|
|
||||||
// Override this to return true because the part of parent window
|
|
||||||
// background between our controlling wxChoice and the page area should
|
|
||||||
// show through.
|
|
||||||
virtual bool HasTransparentBackground() wxOVERRIDE { return true; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void DoSetWindowVariant(wxWindowVariant variant) wxOVERRIDE;
|
virtual void DoSetWindowVariant(wxWindowVariant variant) wxOVERRIDE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user