Fix wxTextCtrl::GetStyle() with GTK+ 3
The text and background colours are now stored in the rgba array instead of fg_color and bg_color as with GTK+ 2 (the latter ones seem to have been repurposed for the underline and strike-through colours!). Also make the unit test for this method more robust.
This commit is contained in:
@@ -1777,8 +1777,13 @@ bool wxTextCtrl::GetStyle(long position, wxTextAttr& style)
|
||||
}
|
||||
else // have custom attributes
|
||||
{
|
||||
#ifdef __WXGTK3__
|
||||
style.SetBackgroundColour(*pattr->appearance.rgba[0]);
|
||||
style.SetTextColour(*pattr->appearance.rgba[1]);
|
||||
#else
|
||||
style.SetBackgroundColour(pattr->appearance.bg_color);
|
||||
style.SetTextColour(pattr->appearance.fg_color);
|
||||
#endif
|
||||
|
||||
const wxGtkString
|
||||
pangoFontString(pango_font_description_to_string(pattr->font));
|
||||
|
||||
Reference in New Issue
Block a user