Allow changing the colour of wxInfoBarGeneric text.
Override SetForegroundColour() to forward it to the text control. See #15671. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -79,6 +79,11 @@ public:
|
|||||||
// (default font is a larger and bold version of the normal one)
|
// (default font is a larger and bold version of the normal one)
|
||||||
virtual bool SetFont(const wxFont& font);
|
virtual bool SetFont(const wxFont& font);
|
||||||
|
|
||||||
|
#if wxABI_VERSION >= 30001
|
||||||
|
// same thing with the colour: this affects the text colour
|
||||||
|
virtual bool SetForegroundColour(const wxColor& colour);
|
||||||
|
#endif // 3.0.1+
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// info bar shouldn't have any border by default, the colour difference
|
// info bar shouldn't have any border by default, the colour difference
|
||||||
// between it and the main window separates it well enough
|
// between it and the main window separates it well enough
|
||||||
|
@@ -110,6 +110,17 @@ bool wxInfoBarGeneric::SetFont(const wxFont& font)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxInfoBarGeneric::SetForegroundColour(const wxColor& colour)
|
||||||
|
{
|
||||||
|
if ( !wxInfoBarBase::SetForegroundColour(colour) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if ( m_text )
|
||||||
|
m_text->SetForegroundColour(colour);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
wxInfoBarGeneric::BarPlacement wxInfoBarGeneric::GetBarPlacement() const
|
wxInfoBarGeneric::BarPlacement wxInfoBarGeneric::GetBarPlacement() const
|
||||||
{
|
{
|
||||||
wxSizer * const sizer = GetContainingSizer();
|
wxSizer * const sizer = GetContainingSizer();
|
||||||
|
@@ -24,6 +24,10 @@
|
|||||||
# symbols available since the beginning of this branch are only given
|
# symbols available since the beginning of this branch are only given
|
||||||
# generic branch tag (don't remove this!):
|
# generic branch tag (don't remove this!):
|
||||||
|
|
||||||
|
@WX_VERSION_TAG@.1 {
|
||||||
|
*wxInfoBarGeneric*SetForegroundColour*;
|
||||||
|
};
|
||||||
|
|
||||||
@WX_VERSION_TAG@ {
|
@WX_VERSION_TAG@ {
|
||||||
*;
|
*;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user