#include "gtkprivate.h"
#include "gtkscrollable.h"
#include "gtksizerequest.h"
-#include "deprecated/gtkrender.h"
+#include "gtkrenderbackgroundprivate.h"
+#include "gtkrenderborderprivate.h"
+#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
#include "gtktreednd.h"
#include "gtktypebuiltins.h"
GtkStyleContext *context;
int width, height;
double offset_x, offset_y;
+ GtkCssBoxes boxes;
icon_view = GTK_ICON_VIEW (widget);
gtk_style_context_save_to_node (context, icon_view->priv->dndnode);
gtk_style_context_set_state (context, gtk_style_context_get_state (context) | GTK_STATE_FLAG_DROP_ACTIVE);
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- gtk_snapshot_render_frame (snapshot, context,
- rect.x, rect.y,
- rect.width, rect.height);
-G_GNUC_END_IGNORE_DEPRECATIONS
+ gtk_css_boxes_init_border_box (&boxes,
+ gtk_style_context_lookup_style (context),
+ rect.x, rect.y, rect.width, rect.height);
+ gtk_css_style_snapshot_border (&boxes, snapshot);
gtk_style_context_restore (context);
}
GtkWidget *widget = GTK_WIDGET (icon_view);
GtkIconViewPrivate *priv = icon_view->priv;
GtkCellAreaContext *context;
+ GtkCssBoxes boxes;
if (priv->model == NULL || item->cell_area.width <= 0 || item->cell_area.height <= 0)
return;
gtk_style_context_set_state (style_context, state);
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- gtk_snapshot_render_background (snapshot, style_context,
- x - priv->item_padding,
- y - priv->item_padding,
- item->cell_area.width + priv->item_padding * 2,
- item->cell_area.height + priv->item_padding * 2);
- gtk_snapshot_render_frame (snapshot, style_context,
- x - priv->item_padding,
- y - priv->item_padding,
- item->cell_area.width + priv->item_padding * 2,
- item->cell_area.height + priv->item_padding * 2);
-G_GNUC_END_IGNORE_DEPRECATIONS
+ gtk_css_boxes_init_border_box (&boxes,
+ gtk_style_context_lookup_style (style_context),
+ x - priv->item_padding,
+ y - priv->item_padding,
+ item->cell_area.width + priv->item_padding * 2,
+ item->cell_area.height + priv->item_padding * 2);
+ gtk_css_style_snapshot_background (&boxes, snapshot);
+ gtk_css_style_snapshot_border (&boxes, snapshot);
cell_area.x = x;
cell_area.y = y;
GtkIconViewPrivate *priv = icon_view->priv;
GtkStyleContext *context;
GdkRectangle rect;
+ GtkCssBoxes boxes;
rect.x = MIN (priv->rubberband_x1, priv->rubberband_x2);
rect.y = MIN (priv->rubberband_y1, priv->rubberband_y2);
gtk_style_context_save_to_node (context, priv->rubberband_node);
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- gtk_snapshot_render_background (snapshot, context,
- rect.x, rect.y,
- rect.width, rect.height);
- gtk_snapshot_render_frame (snapshot, context,
- rect.x, rect.y,
- rect.width, rect.height);
-G_GNUC_END_IGNORE_DEPRECATIONS
+ gtk_css_boxes_init_border_box (&boxes,
+ gtk_style_context_lookup_style (context),
+ rect.x, rect.y,
+ rect.width, rect.height);
+ gtk_css_style_snapshot_background (&boxes, snapshot);
+ gtk_css_style_snapshot_border (&boxes, snapshot);
gtk_style_context_restore (context);
}