Move GTK3 wxNO_BORDER handling to wxControl
So wxNO_BORDER works with other controls, such as wxBitmapButton. Also use GTK prefix on ApplyCssStyle(), and add an overload that creates the GtkCssProvider.
This commit is contained in:
@@ -4476,7 +4476,7 @@ PangoContext *wxWindowGTK::GTKGetPangoDefaultContext()
|
||||
}
|
||||
|
||||
#ifdef __WXGTK3__
|
||||
void wxWindowGTK::ApplyCssStyle(GtkCssProvider* provider, const char* style)
|
||||
void wxWindowGTK::GTKApplyCssStyle(GtkCssProvider* provider, const char* style)
|
||||
{
|
||||
wxCHECK_RET(m_widget, "invalid window");
|
||||
|
||||
@@ -4489,6 +4489,13 @@ void wxWindowGTK::ApplyCssStyle(GtkCssProvider* provider, const char* style)
|
||||
GTK_STYLE_PROVIDER(provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
}
|
||||
|
||||
void wxWindowGTK::GTKApplyCssStyle(const char* style)
|
||||
{
|
||||
GtkCssProvider* provider = gtk_css_provider_new();
|
||||
GTKApplyCssStyle(provider, style);
|
||||
g_object_unref(provider);
|
||||
}
|
||||
#else // GTK+ < 3
|
||||
GtkRcStyle* wxWindowGTK::GTKCreateWidgetStyle()
|
||||
{
|
||||
|
Reference in New Issue
Block a user