diff --git a/src/gtk/settings.cpp b/src/gtk/settings.cpp index a3868eb217..3063f4fcaf 100644 --- a/src/gtk/settings.cpp +++ b/src/gtk/settings.cpp @@ -87,6 +87,21 @@ static GtkWidget* ButtonWidget() return s_widget; } +#if GTK_CHECK_VERSION(2,10,0) +static GtkWidget* LinkButtonWidget() +{ + static GtkWidget *s_widget; + if (s_widget == NULL && wx_is_at_least_gtk2(10)) + { + s_widget = gtk_link_button_new("http://test.com"); + g_object_add_weak_pointer(G_OBJECT(s_widget), (void**)&s_widget); + gtk_container_add(ContainerWidget(), s_widget); + gtk_widget_ensure_style(s_widget); + } + return s_widget; +} +#endif // GTK 2.10+ + static GtkWidget* ListWidget() { static GtkWidget* s_widget; @@ -623,6 +638,18 @@ static const GtkStyle* ButtonStyle() return gtk_widget_get_style(ButtonWidget()); } +static const wxColor LinkButtonColor() +{ +#if GTK_CHECK_VERSION(2,10,0) + GdkColor *link_color = NULL; + gtk_widget_style_get(LinkButtonWidget(), "link-color", &link_color, NULL); + if (link_color) + return wxColor(*link_color); +#endif // GTK 2.10+ + + return *wxBLUE; +} + static const GtkStyle* ListStyle() { return gtk_widget_get_style(ListWidget()); @@ -748,8 +775,7 @@ wxColour wxSystemSettingsNative::GetColour( wxSystemColour index ) break; case wxSYS_COLOUR_HOTLIGHT: - // TODO - color = *wxBLACK; + color = LinkButtonColor(); break; case wxSYS_COLOUR_MAX: