index 7465aefb20cb0149df621b9a6f6274f0d828263a..86e7bc14c3d59fe0163ae0ce2906d69e470ae8b5 100644 (file)
GdlDockItemGrip *grip;
GdkRectangle title_area;
GdkRectangle expose_area;
+ GtkStyle *bg_style;
gint layout_width;
gint layout_height;
gint text_x;
gint text_y;
+ gboolean item_or_child_has_focus;
grip = GDL_DOCK_ITEM_GRIP (widget);
gdl_dock_item_grip_get_title_area (grip, &title_area);
- /* draw darker a background */
- gdk_draw_rectangle (GDK_DRAWABLE (widget->window),
- gtk_widget_get_style (widget)->dark_gc[widget->state],
- TRUE,
- 1, 0,
- widget->allocation.width - 1,
- widget->allocation.height);
+ /* draw background, highlight it if the dock item or any of its
+ * descendants have focus */
+ bg_style = (gdl_dock_item_or_child_has_focus (grip->item) ?
+ gtk_widget_get_style (widget)->dark_gc[widget->state] :
+ gtk_widget_get_style (widget)->mid_gc[widget->state]);
+
+ gdk_draw_rectangle (GDK_DRAWABLE (widget->window), bg_style, TRUE,
+ 1, 0, widget->allocation.width - 1, widget->allocation.height);
if (grip->_priv->icon_pixbuf) {
GdkRectangle pixbuf_rect;