// GetBestSize is called.
gtk_widget_ensure_style(m_widget);
- InheritAttributes();
ApplyWidgetStyle();
SetInitialBestSize(size);
}
int state)
{
wxVisualAttributes attr;
+ // NB: we need toplevel window so that GTK+ can find the right style
+ GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
GtkWidget* widget = widget_new();
+ gtk_container_add(GTK_CONTAINER(wnd), widget);
attr = GetDefaultAttributesFromGTKWidget(widget, useBase, state);
- gtk_widget_destroy(widget);
+ gtk_widget_destroy(wnd);
return attr;
}
int state)
{
wxVisualAttributes attr;
+ // NB: we need toplevel window so that GTK+ can find the right style
+ GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
GtkWidget* widget = widget_new("");
+ gtk_container_add(GTK_CONTAINER(wnd), widget);
attr = GetDefaultAttributesFromGTKWidget(widget, useBase, state);
- gtk_widget_destroy(widget);
+ gtk_widget_destroy(wnd);
return attr;
}
int state)
{
wxVisualAttributes attr;
+ // NB: we need toplevel window so that GTK+ can find the right style
+ GtkWidget *wnd = gtk_window_new(GTK_WINDOW_TOPLEVEL);
GtkWidget* widget = widget_new(NULL);
+ gtk_container_add(GTK_CONTAINER(wnd), widget);
attr = GetDefaultAttributesFromGTKWidget(widget, useBase, state);
- gtk_widget_destroy(widget);
+ gtk_widget_destroy(wnd);
return attr;
}