The wrong class was being used, so the theming engine didn't
match it properly.
gtk_paned_init (GtkPaned *paned)
{
GtkPanedPrivate *priv;
+ GtkStyleContext *context;
gtk_widget_set_has_window (GTK_WIDGET (paned), FALSE);
gtk_widget_set_can_focus (GTK_WIDGET (paned), TRUE);
priv->handle_pos.y = -1;
priv->drag_pos = -1;
+
+ context = gtk_widget_get_style_context (GTK_WIDGET (paned));
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_PANE_SEPARATOR);
}
static void
*/
#define GTK_STYLE_CLASS_DND "dnd"
+/**
+ * GTK_STYLE_CLASS_PANE_SEPARATOR:
+ *
+ * A CSS class for a pane separator, such as those in #GtkPaned.
+ */
+#define GTK_STYLE_CLASS_PANE_SEPARATOR "pane-separator"
+
/**
* GTK_STYLE_CLASS_INFO:
*
cairo_rectangle (cr, x, y, width, height);
cairo_fill (cr);
- if (gtk_theming_engine_has_class (engine, "grip"))
+ if (gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_GRIP))
{
GtkJunctionSides sides;
gint skip = -1;
cairo_restore (cr);
}
- else if (gtk_theming_engine_has_class (engine, "paned"))
+ else if (gtk_theming_engine_has_class (engine, GTK_STYLE_CLASS_PANE_SEPARATOR))
{
if (width > height)
for (xx = x + width / 2 - 15; xx <= x + width / 2 + 15; xx += 5)