Merge recent stattext chages also into WXgtk1

This commit is contained in:
Jouk
2019-07-09 09:02:14 +02:00
parent acef902ea6
commit d3a3353a8d
2 changed files with 21 additions and 0 deletions

View File

@@ -48,6 +48,8 @@ protected:
int sizeFlags = wxSIZE_AUTO);
virtual wxSize DoGetBestSize() const;
virtual wxString WXGetVisibleLabel() const wxOVERRIDE;
virtual void WXSetVisibleLabel(const wxString& str) wxOVERRIDE;
wxDECLARE_DYNAMIC_CLASS(wxStaticText);
};

View File

@@ -153,6 +153,25 @@ bool wxStaticText::SetForegroundColour(const wxColour& colour)
return true;
}
// These functions are not used as GTK supports ellipsization natively and we
// never call the base class UpdateText() which uses them.
//
// Note that, unfortunately, we still need to define them because they still
// exist, as pure virtuals, in the base class even in wxGTK to allow
// wxGenericStaticText to override them.
wxString wxStaticText::WXGetVisibleLabel() const
{
wxFAIL_MSG(wxS("Unreachable"));
return wxString();
}
void wxStaticText::WXSetVisibleLabel(const wxString& WXUNUSED(str))
{
wxFAIL_MSG(wxS("Unreachable"));
}
// static
wxVisualAttributes
wxStaticText::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))