mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 06:10:21 +00:00
widget: Remove gtk_widget_get_border_allocation
This commit is contained in:
parent
5f859a1f24
commit
9f3f640c0d
@ -98,18 +98,17 @@ swatch_snapshot (GtkWidget *widget,
|
||||
{
|
||||
cairo_pattern_t *pattern;
|
||||
cairo_matrix_t matrix;
|
||||
GtkAllocation border_allocation;
|
||||
int width, height;
|
||||
GskRoundedRect content_box;
|
||||
|
||||
gtk_widget_get_border_allocation (widget, &border_allocation);
|
||||
gtk_widget_get_content_size (widget, &width, &height);
|
||||
|
||||
gtk_rounded_boxes_init_for_style (NULL,
|
||||
NULL,
|
||||
&content_box,
|
||||
gtk_style_context_lookup_style (context),
|
||||
0, 0,
|
||||
border_allocation.width,
|
||||
border_allocation.height);
|
||||
width, height);
|
||||
gtk_snapshot_push_rounded_clip (snapshot,
|
||||
&content_box,
|
||||
"ColorSwatchClip");
|
||||
|
@ -7961,9 +7961,8 @@ gtk_entry_get_icon_at_pos (GtkEntry *entry,
|
||||
if (icon_info == NULL)
|
||||
continue;
|
||||
|
||||
gtk_widget_get_border_allocation (icon_info->widget, &allocation);
|
||||
if (x >= allocation.x && x < allocation.x + allocation.width &&
|
||||
y >= allocation.y && y < allocation.y + allocation.height)
|
||||
gtk_widget_get_outer_allocation (icon_info->widget, &allocation);
|
||||
if (gdk_rectangle_contains_point (&allocation, x, y))
|
||||
return i;
|
||||
}
|
||||
|
||||
|
@ -2412,7 +2412,7 @@ get_drop_position (GtkNotebook *notebook)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
|
||||
gtk_widget_get_border_allocation (page->tab_widget, &allocation);
|
||||
gtk_widget_get_outer_allocation (page->tab_widget, &allocation);
|
||||
|
||||
switch (priv->tab_pos)
|
||||
{
|
||||
|
@ -2705,7 +2705,7 @@ gtk_range_update_mouse_location (GtkRange *range)
|
||||
y = priv->mouse_y;
|
||||
|
||||
gtk_widget_get_own_allocation (widget, &range_alloc);
|
||||
gtk_widget_get_border_allocation (priv->trough_widget, &trough_alloc);
|
||||
gtk_widget_get_outer_allocation (priv->trough_widget, &trough_alloc);
|
||||
|
||||
gtk_widget_get_outer_allocation (priv->slider_widget, &slider_alloc);
|
||||
gtk_widget_translate_coordinates (priv->trough_widget, widget,
|
||||
|
@ -333,7 +333,7 @@ gtk_scale_allocate_value (GtkScale *scale,
|
||||
gtk_widget_get_content_size (widget, &range_width, &range_height);
|
||||
|
||||
slider_widget = gtk_range_get_slider_widget (range);
|
||||
gtk_widget_get_border_allocation (slider_widget, &slider_alloc);
|
||||
gtk_widget_get_outer_allocation (slider_widget, &slider_alloc);
|
||||
|
||||
gtk_widget_measure (priv->value_widget,
|
||||
GTK_ORIENTATION_HORIZONTAL, -1,
|
||||
|
@ -13272,28 +13272,6 @@ gtk_widget_get_content_size (GtkWidget *widget,
|
||||
margin.bottom + border.bottom + padding.bottom;
|
||||
}
|
||||
|
||||
void
|
||||
gtk_widget_get_border_allocation (GtkWidget *widget,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
|
||||
GtkBorder margin, border;
|
||||
GtkCssStyle *style;
|
||||
|
||||
style = gtk_css_node_get_style (priv->cssnode);
|
||||
get_box_margin (style, &margin);
|
||||
get_box_border (style, &border);
|
||||
|
||||
*allocation = priv->allocation;
|
||||
|
||||
allocation->x += margin.left + border.left;
|
||||
allocation->y += margin.top + border.top;
|
||||
allocation->width -= margin.left + border.left +
|
||||
margin.right + border.right;
|
||||
allocation->height -= margin.top + border.top +
|
||||
margin.bottom + border.bottom;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_widget_get_allocated_width:
|
||||
* @widget: the widget to query
|
||||
|
@ -314,8 +314,6 @@ void gtk_widget_focus_sort (GtkWidget *wi
|
||||
gboolean gtk_widget_focus_move (GtkWidget *widget,
|
||||
GtkDirectionType direction,
|
||||
GPtrArray *focus_order);
|
||||
void gtk_widget_get_border_allocation (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
void gtk_widget_get_outer_allocation (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
void gtk_widget_get_own_allocation (GtkWidget *widget,
|
||||
|
Loading…
Reference in New Issue
Block a user