git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44688
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// local functions
// ----------------------------------------------------------------------------
// local functions
// ----------------------------------------------------------------------------
+static inline bool UseNative()
{
// native gtk_link_button widget is only available in GTK+ 2.10 and later
return !gtk_check_version(2, 10, 0);
{
// native gtk_link_button widget is only available in GTK+ 2.10 and later
return !gtk_check_version(2, 10, 0);
wxColour wxHyperlinkCtrl::GetNormalColour() const
{
wxColour wxHyperlinkCtrl::GetNormalColour() const
{
if ( UseNative() )
{
GdkColor *link_color = NULL;
if ( UseNative() )
{
GdkColor *link_color = NULL;
- wxColour ret = wxNullColour;
// convert GdkColor in wxColour
gtk_widget_style_get(m_widget, "link-color", &link_color, NULL);
if (link_color)
// convert GdkColor in wxColour
gtk_widget_style_get(m_widget, "link-color", &link_color, NULL);
if (link_color)
- ret.Set(link_color->red, link_color->green, link_color->blue);
+ ret = wxColour(*link_color);
gdk_color_free (link_color);
gdk_color_free (link_color);
- return wxGenericHyperlinkCtrl::GetNormalColour();
+ ret = wxGenericHyperlinkCtrl::GetNormalColour();
+
+ return ret;
}
void wxHyperlinkCtrl::SetVisitedColour(const wxColour &colour)
}
void wxHyperlinkCtrl::SetVisitedColour(const wxColour &colour)
wxColour wxHyperlinkCtrl::GetVisitedColour() const
{
wxColour wxHyperlinkCtrl::GetVisitedColour() const
{
if ( UseNative() )
{
GdkColor *link_color = NULL;
if ( UseNative() )
{
GdkColor *link_color = NULL;
- wxColour ret = wxNullColour;
// convert GdkColor in wxColour
gtk_widget_style_get(m_widget, "visited-link-color", &link_color, NULL);
if (link_color)
// convert GdkColor in wxColour
gtk_widget_style_get(m_widget, "visited-link-color", &link_color, NULL);
if (link_color)
- ret.Set(link_color->red, link_color->green, link_color->blue);
+ ret = wxColour(*link_color);
gdk_color_free (link_color);
gdk_color_free (link_color);
}
else
return wxGenericHyperlinkCtrl::GetVisitedColour();
}
else
return wxGenericHyperlinkCtrl::GetVisitedColour();
}
void wxHyperlinkCtrl::SetHoverColour(const wxColour &colour)
}
void wxHyperlinkCtrl::SetHoverColour(const wxColour &colour)