forked from AuroraMiddleware/gtk
widget: Remove clip from size-allocate vfunc
As the clip is no longer needed, get rid of it.
This commit is contained in:
parent
fc6de135fe
commit
169203951b
@ -457,13 +457,12 @@ demo_application_window_constructed (GObject *object)
|
||||
static void
|
||||
demo_application_window_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
||||
|
||||
GTK_WIDGET_CLASS (demo_application_window_parent_class)->size_allocate (widget, allocation,
|
||||
baseline, out_clip);
|
||||
baseline);
|
||||
|
||||
if (!window->maximized && !window->fullscreen)
|
||||
gtk_window_get_size (GTK_WINDOW (window), &window->width, &window->height);
|
||||
|
@ -127,8 +127,7 @@ gtk_fishbowl_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_fishbowl_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkFishbowl *fishbowl = GTK_FISHBOWL (widget);
|
||||
GtkFishbowlPrivate *priv = gtk_fishbowl_get_instance_private (fishbowl);
|
||||
@ -139,8 +138,6 @@ gtk_fishbowl_size_allocate (GtkWidget *widget,
|
||||
|
||||
for (children = priv->children; children; children = children->next)
|
||||
{
|
||||
GtkAllocation child_clip;
|
||||
|
||||
child = children->data;
|
||||
|
||||
if (!gtk_widget_get_visible (child->widget))
|
||||
@ -152,7 +149,7 @@ gtk_fishbowl_size_allocate (GtkWidget *widget,
|
||||
child_allocation.width = child_requisition.width;
|
||||
child_allocation.height = child_requisition.height;
|
||||
|
||||
gtk_widget_size_allocate (child->widget, &child_allocation, -1, &child_clip);
|
||||
gtk_widget_size_allocate (child->widget, &child_allocation, -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,8 +58,7 @@ static void
|
||||
entry_size_allocate_cb (GtkEntry *entry,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip,
|
||||
gpointer user_data)
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkEntryIconPosition popover_pos;
|
||||
GtkPopover *popover = user_data;
|
||||
|
@ -21,7 +21,6 @@ static void
|
||||
size_allocate_cb (GtkWidget *widget,
|
||||
GtkAllocation *alloc,
|
||||
int baseline,
|
||||
GdkRectangle *clip,
|
||||
gpointer data)
|
||||
{
|
||||
if (surface)
|
||||
|
@ -164,13 +164,12 @@ G_DEFINE_TYPE_WITH_PRIVATE (GtkAccelLabel, gtk_accel_label, GTK_TYPE_WIDGET)
|
||||
static void
|
||||
gtk_accel_label_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkAccelLabel *al = GTK_ACCEL_LABEL (widget);
|
||||
GtkAccelLabelPrivate *priv = gtk_accel_label_get_instance_private (al);
|
||||
|
||||
gtk_widget_size_allocate (priv->box, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->box, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -271,11 +271,10 @@ gtk_action_bar_snapshot (GtkWidget *widget,
|
||||
static void
|
||||
gtk_action_bar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (GTK_ACTION_BAR (widget));
|
||||
gtk_widget_size_allocate (priv->revealer, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->revealer, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -938,15 +938,14 @@ gtk_app_chooser_widget_snapshot (GtkWidget *widget,
|
||||
static void
|
||||
gtk_app_chooser_widget_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkAppChooserWidget *self = GTK_APP_CHOOSER_WIDGET (widget);
|
||||
GtkAppChooserWidgetPrivate *priv = gtk_app_chooser_widget_get_instance_private (self);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_app_chooser_widget_parent_class)->size_allocate (widget, allocation, baseline, out_clip);
|
||||
GTK_WIDGET_CLASS (gtk_app_chooser_widget_parent_class)->size_allocate (widget, allocation, baseline);
|
||||
|
||||
gtk_widget_size_allocate (priv->overlay, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->overlay, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -593,8 +593,7 @@ gtk_application_window_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_application_window_real_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkApplicationWindow *window = GTK_APPLICATION_WINDOW (widget);
|
||||
|
||||
@ -613,19 +612,18 @@ gtk_application_window_real_size_allocate (GtkWidget *widget,
|
||||
&menubar_height, NULL, NULL, NULL);
|
||||
|
||||
menubar_allocation.height = menubar_height;
|
||||
gtk_widget_size_allocate (window->priv->menubar, &menubar_allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (window->priv->menubar, &menubar_allocation, baseline);
|
||||
|
||||
child_allocation.y += menubar_height;
|
||||
child_allocation.height -= menubar_height;
|
||||
child = gtk_bin_get_child (GTK_BIN (window));
|
||||
if (child != NULL && gtk_widget_get_visible (child))
|
||||
gtk_widget_size_allocate (child, &child_allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, baseline);
|
||||
}
|
||||
else
|
||||
GTK_WIDGET_CLASS (gtk_application_window_parent_class)->size_allocate (widget,
|
||||
allocation,
|
||||
baseline,
|
||||
out_clip);
|
||||
baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -99,8 +99,7 @@ static void gtk_button_box_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_button_box_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_button_box_remove (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
static void gtk_button_box_set_child_property (GtkContainer *container,
|
||||
@ -745,8 +744,7 @@ gtk_button_box_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_button_box_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkButtonBox *bbox = GTK_BUTTON_BOX (widget);
|
||||
GtkButtonBoxPrivate *priv = bbox->priv;
|
||||
@ -774,14 +772,12 @@ gtk_button_box_size_allocate (GtkWidget *widget,
|
||||
gint baseline_height;
|
||||
gint child_baseline;
|
||||
gint i;
|
||||
GdkRectangle child_clip;
|
||||
|
||||
if (priv->layout_style == GTK_BUTTONBOX_EXPAND)
|
||||
{
|
||||
GTK_WIDGET_CLASS (gtk_button_box_parent_class)->size_allocate (widget,
|
||||
allocation,
|
||||
baseline,
|
||||
out_clip);
|
||||
baseline);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1035,8 +1031,7 @@ gtk_button_box_size_allocate (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (child, &child_allocation, child_baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, child_baseline);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -66,14 +66,13 @@ G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GtkBin, gtk_bin, GTK_TYPE_CONTAINER)
|
||||
static void
|
||||
gtk_bin_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkBin *bin = GTK_BIN (widget);
|
||||
GtkBinPrivate *priv = gtk_bin_get_instance_private (bin);
|
||||
|
||||
if (priv->child && gtk_widget_get_visible (priv->child))
|
||||
gtk_widget_size_allocate (priv->child, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->child, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
10
gtk/gtkbox.c
10
gtk/gtkbox.c
@ -143,8 +143,7 @@ struct _GtkBoxChild
|
||||
|
||||
static void gtk_box_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
|
||||
static void gtk_box_direction_changed (GtkWidget *widget,
|
||||
GtkTextDirection previous_direction);
|
||||
@ -371,8 +370,7 @@ get_spacing (GtkBox *box)
|
||||
static void
|
||||
gtk_box_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GdkRectangle *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkBox *box = GTK_BOX (widget);
|
||||
GtkBoxPrivate *priv = gtk_box_get_instance_private (box);
|
||||
@ -398,7 +396,6 @@ gtk_box_size_allocate (GtkWidget *widget,
|
||||
gint x = 0, y = 0, i;
|
||||
gint child_size;
|
||||
gint spacing;
|
||||
GdkRectangle clip;
|
||||
|
||||
|
||||
count_expand_children (box, &nvis_children, &nexpand_children);
|
||||
@ -660,8 +657,7 @@ gtk_box_size_allocate (GtkWidget *widget,
|
||||
child_allocation.y -= child_size;
|
||||
}
|
||||
}
|
||||
gtk_widget_size_allocate (child->widget, &child_allocation, baseline, &clip);
|
||||
gdk_rectangle_union (&clip, out_clip, out_clip);
|
||||
gtk_widget_size_allocate (child->widget, &child_allocation, baseline);
|
||||
|
||||
i++;
|
||||
}
|
||||
|
@ -273,8 +273,7 @@ static void gtk_calendar_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_calendar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_calendar_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
static void gtk_calendar_button_press (GtkGestureMultiPress *gesture,
|
||||
@ -1854,8 +1853,7 @@ gtk_calendar_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_calendar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkCalendar *calendar = GTK_CALENDAR (widget);
|
||||
GtkCalendarPrivate *priv = calendar->priv;
|
||||
|
@ -67,8 +67,7 @@ static void gtk_cell_view_finalize (GObject *obj
|
||||
static void gtk_cell_view_dispose (GObject *object);
|
||||
static void gtk_cell_view_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_cell_view_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
static void gtk_cell_view_set_value (GtkCellView *cell_view,
|
||||
@ -461,8 +460,7 @@ gtk_cell_view_dispose (GObject *object)
|
||||
static void
|
||||
gtk_cell_view_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkCellView *cellview;
|
||||
GtkCellViewPrivate *priv;
|
||||
|
@ -384,12 +384,10 @@ gtk_center_box_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_center_box_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkCenterBox *self = GTK_CENTER_BOX (widget);
|
||||
GtkAllocation child_allocation;
|
||||
GtkAllocation child_clip;
|
||||
GtkWidget *child[3];
|
||||
int child_size[3];
|
||||
int child_pos[3];
|
||||
@ -529,8 +527,7 @@ gtk_center_box_size_allocate (GtkWidget *widget,
|
||||
child_allocation.height = child_size[i];
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (child[i], &child_allocation, allocation->y + baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (child[i], &child_allocation, allocation->y + baseline);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,8 +78,7 @@
|
||||
|
||||
static void gtk_check_button_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
|
||||
typedef struct {
|
||||
GtkWidget *indicator_widget;
|
||||
@ -442,12 +441,10 @@ gtk_check_button_new_with_mnemonic (const gchar *label)
|
||||
static void
|
||||
gtk_check_button_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkCheckButtonPrivate *priv = gtk_check_button_get_instance_private (GTK_CHECK_BUTTON (widget));
|
||||
GtkAllocation child_alloc = { 0 };
|
||||
GdkRectangle child_clip;
|
||||
GtkWidget *child;
|
||||
gboolean is_rtl = _gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
|
||||
int x = 0;
|
||||
@ -471,8 +468,7 @@ gtk_check_button_size_allocate (GtkWidget *widget,
|
||||
child_alloc.x = allocation->x;
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (priv->indicator_widget, &child_alloc, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->indicator_widget, &child_alloc, baseline);
|
||||
}
|
||||
|
||||
child = gtk_bin_get_child (GTK_BIN (widget));
|
||||
@ -483,8 +479,7 @@ gtk_check_button_size_allocate (GtkWidget *widget,
|
||||
child_alloc.width = allocation->width - child_alloc.width; /* Indicator width */
|
||||
child_alloc.height = allocation->height;
|
||||
|
||||
gtk_widget_size_allocate (child, &child_alloc, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (child, &child_alloc, baseline);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,10 +106,8 @@ G_DEFINE_TYPE_WITH_CODE (GtkCheckMenuItem, gtk_check_menu_item, GTK_TYPE_MENU_IT
|
||||
static void
|
||||
gtk_check_menu_item_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkAllocation child_clip;
|
||||
GtkAllocation indicator_alloc;
|
||||
GtkCheckMenuItem *check_menu_item = GTK_CHECK_MENU_ITEM (widget);
|
||||
GtkCheckMenuItemPrivate *priv = check_menu_item->priv;
|
||||
@ -117,8 +115,7 @@ gtk_check_menu_item_size_allocate (GtkWidget *widget,
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_check_menu_item_parent_class)->size_allocate (widget,
|
||||
allocation,
|
||||
baseline,
|
||||
out_clip);
|
||||
baseline);
|
||||
|
||||
gtk_widget_measure (priv->indicator_widget,
|
||||
GTK_ORIENTATION_HORIZONTAL,
|
||||
@ -142,9 +139,7 @@ gtk_check_menu_item_size_allocate (GtkWidget *widget,
|
||||
|
||||
gtk_widget_size_allocate (priv->indicator_widget,
|
||||
&indicator_alloc,
|
||||
baseline,
|
||||
&child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -169,13 +169,12 @@ gtk_color_button_snapshot (GtkWidget *widget,
|
||||
static void
|
||||
gtk_color_button_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkColorButton *button = GTK_COLOR_BUTTON (widget);
|
||||
GtkColorButtonPrivate *priv = gtk_color_button_get_instance_private (button);
|
||||
|
||||
gtk_widget_size_allocate (priv->button, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->button, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -175,8 +175,7 @@ create_texture (GtkColorPlane *plane)
|
||||
static void
|
||||
plane_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkColorPlane *plane = GTK_COLOR_PLANE (widget);
|
||||
|
||||
|
@ -368,11 +368,10 @@ tap_action (GtkGestureMultiPress *gesture,
|
||||
static void
|
||||
swatch_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkColorSwatch *swatch = GTK_COLOR_SWATCH (widget);
|
||||
gtk_widget_size_allocate (swatch->priv->overlay_widget, allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (swatch->priv->overlay_widget, allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -363,13 +363,12 @@ gtk_combo_box_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_combo_box_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
|
||||
GtkComboBoxPrivate *priv = combo_box->priv;
|
||||
|
||||
gtk_widget_size_allocate (priv->box, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->box, allocation, baseline);
|
||||
|
||||
if (gtk_widget_get_visible (priv->popup_widget))
|
||||
{
|
||||
|
@ -1690,7 +1690,6 @@ gtk_container_real_check_resize (GtkContainer *container)
|
||||
{
|
||||
if (!_gtk_widget_is_toplevel (widget))
|
||||
{
|
||||
GtkAllocation clip;
|
||||
gtk_widget_get_preferred_size (widget, &requisition, NULL);
|
||||
gtk_widget_get_allocated_size (widget, &allocation, &baseline);
|
||||
|
||||
@ -1698,7 +1697,7 @@ gtk_container_real_check_resize (GtkContainer *container)
|
||||
allocation.width = requisition.width;
|
||||
if (allocation.height < requisition.height)
|
||||
allocation.height = requisition.height;
|
||||
gtk_widget_size_allocate (widget, &allocation, baseline, &clip);
|
||||
gtk_widget_size_allocate (widget, &allocation, baseline);
|
||||
}
|
||||
else
|
||||
gtk_widget_queue_resize (widget);
|
||||
|
@ -413,8 +413,7 @@ static void gtk_entry_unrealize (GtkWidget *widget);
|
||||
static void gtk_entry_unmap (GtkWidget *widget);
|
||||
static void gtk_entry_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_entry_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
static gboolean gtk_entry_event (GtkWidget *widget,
|
||||
@ -3140,12 +3139,10 @@ gtk_entry_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_entry_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkEntry *entry = GTK_ENTRY (widget);
|
||||
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
|
||||
GtkAllocation child_clip;
|
||||
gint i;
|
||||
|
||||
priv->text_baseline = baseline;
|
||||
@ -3182,8 +3179,7 @@ gtk_entry_size_allocate (GtkWidget *widget,
|
||||
icon_alloc.height = allocation->height;
|
||||
priv->text_width -= width;
|
||||
|
||||
gtk_widget_size_allocate (icon_info->widget, &icon_alloc, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (icon_info->widget, &icon_alloc, baseline);
|
||||
}
|
||||
|
||||
if (priv->progress_widget && gtk_widget_get_visible (priv->progress_widget))
|
||||
@ -3201,8 +3197,7 @@ gtk_entry_size_allocate (GtkWidget *widget,
|
||||
progress_alloc.width = allocation->width;
|
||||
progress_alloc.height = nat;
|
||||
|
||||
gtk_widget_size_allocate (priv->progress_widget, &progress_alloc, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->progress_widget, &progress_alloc, -1);
|
||||
}
|
||||
|
||||
/* Do this here instead of gtk_entry_size_allocate() so it works
|
||||
|
@ -177,8 +177,7 @@ static void gtk_expander_get_property (GObject *object,
|
||||
static void gtk_expander_destroy (GtkWidget *widget);
|
||||
static void gtk_expander_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static gboolean gtk_expander_focus (GtkWidget *widget,
|
||||
GtkDirectionType direction);
|
||||
static gboolean gtk_expander_drag_motion (GtkWidget *widget,
|
||||
@ -498,12 +497,11 @@ gtk_expander_destroy (GtkWidget *widget)
|
||||
static void
|
||||
gtk_expander_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkExpanderPrivate *priv = gtk_expander_get_instance_private (GTK_EXPANDER (widget));
|
||||
|
||||
gtk_widget_size_allocate (priv->box, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->box, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -363,13 +363,12 @@ gtk_file_chooser_button_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_file_chooser_button_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkFileChooserButton *button = GTK_FILE_CHOOSER_BUTTON (widget);
|
||||
GtkFileChooserButtonPrivate *priv = gtk_file_chooser_button_get_instance_private (button);
|
||||
|
||||
gtk_widget_size_allocate (priv->child, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->child, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -232,8 +232,7 @@ static void gtk_file_chooser_dialog_map (GtkWidget *wid
|
||||
static void gtk_file_chooser_dialog_unmap (GtkWidget *widget);
|
||||
static void gtk_file_chooser_dialog_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void file_chooser_widget_file_activated (GtkFileChooser *chooser,
|
||||
GtkFileChooserDialog *dialog);
|
||||
static void file_chooser_widget_default_size_changed (GtkWidget *widget,
|
||||
@ -620,13 +619,11 @@ gtk_file_chooser_dialog_unmap (GtkWidget *widget)
|
||||
static void
|
||||
gtk_file_chooser_dialog_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GTK_WIDGET_CLASS (gtk_file_chooser_dialog_parent_class)->size_allocate (widget,
|
||||
allocation,
|
||||
baseline,
|
||||
out_clip);
|
||||
baseline);
|
||||
if (gtk_widget_is_drawable (widget))
|
||||
save_dialog_geometry (GTK_FILE_CHOOSER_DIALOG (widget));
|
||||
}
|
||||
|
@ -7944,18 +7944,16 @@ gtk_file_chooser_widget_snapshot (GtkWidget *widget,
|
||||
static void
|
||||
gtk_file_chooser_widget_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkFileChooserWidget *self = GTK_FILE_CHOOSER_WIDGET (widget);
|
||||
GtkFileChooserWidgetPrivate *priv = gtk_file_chooser_widget_get_instance_private (self);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_file_chooser_widget_parent_class)->size_allocate (widget,
|
||||
allocation,
|
||||
baseline,
|
||||
out_clip);
|
||||
baseline);
|
||||
|
||||
gtk_widget_size_allocate (priv->box, allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (priv->box, allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -103,8 +103,7 @@ static void gtk_fixed_measure (GtkWidget *widget,
|
||||
|
||||
static void gtk_fixed_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_fixed_add (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
static void gtk_fixed_remove (GtkContainer *container,
|
||||
@ -394,8 +393,7 @@ gtk_fixed_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_fixed_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkFixed *fixed = GTK_FIXED (widget);
|
||||
GtkFixedPrivate *priv = fixed->priv;
|
||||
@ -417,7 +415,7 @@ gtk_fixed_size_allocate (GtkWidget *widget,
|
||||
|
||||
child_allocation.width = child_requisition.width;
|
||||
child_allocation.height = child_requisition.height;
|
||||
gtk_widget_size_allocate (child->widget, &child_allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (child->widget, &child_allocation, -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -437,14 +437,13 @@ gtk_flow_box_child_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_flow_box_child_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkWidget *child;
|
||||
|
||||
child = gtk_bin_get_child (GTK_BIN (widget));
|
||||
if (child && gtk_widget_get_visible (child))
|
||||
gtk_widget_size_allocate (child, allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (child, allocation, -1);
|
||||
}
|
||||
|
||||
/* GObject implementation {{{2 */
|
||||
@ -1391,12 +1390,10 @@ get_offset_pixels (GtkAlign align,
|
||||
static void
|
||||
gtk_flow_box_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkFlowBox *box = GTK_FLOW_BOX (widget);
|
||||
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
|
||||
GdkRectangle child_clip;
|
||||
GtkAllocation child_allocation;
|
||||
gint avail_size, avail_other_size, min_items, item_spacing, line_spacing;
|
||||
GtkAlign item_align;
|
||||
@ -1726,8 +1723,7 @@ gtk_flow_box_size_allocate (GtkWidget *widget,
|
||||
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
|
||||
child_allocation.x = allocation->width - child_allocation.x - child_allocation.width;
|
||||
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1);
|
||||
|
||||
item_offset += this_item_size;
|
||||
item_offset += item_spacing;
|
||||
|
@ -474,13 +474,12 @@ gtk_font_button_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_font_button_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkFontButton *button = GTK_FONT_BUTTON (widget);
|
||||
GtkFontButtonPrivate *priv = gtk_font_button_get_instance_private (button);
|
||||
|
||||
gtk_widget_size_allocate (priv->button, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->button, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -669,15 +669,14 @@ gtk_font_chooser_widget_snapshot (GtkWidget *widget,
|
||||
static void
|
||||
gtk_font_chooser_widget_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkFontChooserWidget *self = GTK_FONT_CHOOSER_WIDGET (widget);
|
||||
GtkFontChooserWidgetPrivate *priv = gtk_font_chooser_widget_get_instance_private (self);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_font_chooser_widget_parent_class)->size_allocate (widget, allocation, -1, out_clip);
|
||||
GTK_WIDGET_CLASS (gtk_font_chooser_widget_parent_class)->size_allocate (widget, allocation, -1);
|
||||
|
||||
gtk_widget_size_allocate (priv->stack, allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (priv->stack, allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -120,8 +120,7 @@ static void gtk_frame_get_property (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
static void gtk_frame_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_frame_remove (GtkContainer *container,
|
||||
GtkWidget *child);
|
||||
static void gtk_frame_forall (GtkContainer *container,
|
||||
@ -573,14 +572,12 @@ gtk_frame_get_shadow_type (GtkFrame *frame)
|
||||
static void
|
||||
gtk_frame_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkFrame *frame = GTK_FRAME (widget);
|
||||
GtkFramePrivate *priv = frame->priv;
|
||||
GtkWidget *child;
|
||||
GtkAllocation new_allocation;
|
||||
GtkAllocation child_clip;
|
||||
|
||||
gtk_frame_compute_child_allocation (frame, &new_allocation);
|
||||
priv->child_allocation = new_allocation;
|
||||
@ -607,15 +604,13 @@ gtk_frame_size_allocate (GtkWidget *widget,
|
||||
priv->label_allocation.height = height;
|
||||
priv->label_allocation.width = width;
|
||||
|
||||
gtk_widget_size_allocate (priv->label_widget, &priv->label_allocation, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->label_widget, &priv->label_allocation, -1);
|
||||
}
|
||||
|
||||
child = gtk_bin_get_child (GTK_BIN (widget));
|
||||
if (child && gtk_widget_get_visible (child))
|
||||
{
|
||||
gtk_widget_size_allocate (child, &priv->child_allocation, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (child, &priv->child_allocation, -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,16 +25,14 @@ gtk_gizmo_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_gizmo_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkGizmo *self = GTK_GIZMO (widget);
|
||||
|
||||
if (self->allocate_func)
|
||||
self->allocate_func (self,
|
||||
allocation,
|
||||
baseline,
|
||||
out_clip);
|
||||
baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -23,8 +23,7 @@ typedef void (* GtkGizmoMeasureFunc) (GtkGizmo *gizmo,
|
||||
int *natural_baseline);
|
||||
typedef void (* GtkGizmoAllocateFunc) (GtkGizmo *gizmo,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
typedef gboolean (* GtkGizmoSnapshotFunc) (GtkGizmo *gizmo,
|
||||
GtkSnapshot *snapshot);
|
||||
|
||||
|
@ -632,13 +632,12 @@ gtk_gl_area_unrealize (GtkWidget *widget)
|
||||
static void
|
||||
gtk_gl_area_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkGLArea *area = GTK_GL_AREA (widget);
|
||||
GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_gl_area_parent_class)->size_allocate (widget, allocation, baseline, out_clip);
|
||||
GTK_WIDGET_CLASS (gtk_gl_area_parent_class)->size_allocate (widget, allocation, baseline);
|
||||
|
||||
if (gtk_widget_get_realized (widget))
|
||||
priv->needs_resize = TRUE;
|
||||
|
@ -1520,12 +1520,10 @@ allocate_child (GtkGridRequest *request,
|
||||
|
||||
static void
|
||||
gtk_grid_request_allocate_children (GtkGridRequest *request,
|
||||
const GtkAllocation *allocation,
|
||||
GtkAllocation *out_clip)
|
||||
const GtkAllocation *allocation)
|
||||
{
|
||||
GtkWidget *child;
|
||||
GtkAllocation child_allocation;
|
||||
GtkAllocation child_clip;
|
||||
gint x, y, width, height, baseline, ignore;
|
||||
|
||||
|
||||
@ -1550,8 +1548,7 @@ gtk_grid_request_allocate_children (GtkGridRequest *request,
|
||||
child_allocation.x = allocation->x + allocation->width
|
||||
- (child_allocation.x - allocation->x) - child_allocation.width;
|
||||
|
||||
gtk_widget_size_allocate (child, &child_allocation, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, baseline);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1560,8 +1557,7 @@ gtk_grid_request_allocate_children (GtkGridRequest *request,
|
||||
static void
|
||||
gtk_grid_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkGrid *grid = GTK_GRID (widget);
|
||||
GtkGridRequest request;
|
||||
@ -1595,7 +1591,7 @@ gtk_grid_size_allocate (GtkWidget *widget,
|
||||
gtk_grid_request_position (&request, 0);
|
||||
gtk_grid_request_position (&request, 1);
|
||||
|
||||
gtk_grid_request_allocate_children (&request, allocation, out_clip);
|
||||
gtk_grid_request_allocate_children (&request, allocation);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -911,8 +911,7 @@ gtk_header_bar_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_header_bar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkHeaderBarPrivate *priv = gtk_header_bar_get_instance_private (GTK_HEADER_BAR (widget));
|
||||
GtkWidget *title_widget;
|
||||
@ -936,7 +935,6 @@ gtk_header_bar_size_allocate (GtkWidget *widget,
|
||||
gint x;
|
||||
gint child_size;
|
||||
GtkTextDirection direction;
|
||||
GtkAllocation child_clip = {0, };
|
||||
|
||||
direction = gtk_widget_get_direction (widget);
|
||||
nvis_children = count_visible_children (bar);
|
||||
@ -1113,8 +1111,7 @@ gtk_header_bar_size_allocate (GtkWidget *widget,
|
||||
if (direction == GTK_TEXT_DIR_RTL)
|
||||
child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width;
|
||||
|
||||
gtk_widget_size_allocate (child->widget, &child_allocation, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (child->widget, &child_allocation, baseline);
|
||||
|
||||
next:
|
||||
i++;
|
||||
@ -1151,8 +1148,7 @@ gtk_header_bar_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (title_widget != NULL)
|
||||
{
|
||||
gtk_widget_size_allocate (title_widget, &child_allocation, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (title_widget, &child_allocation, baseline);
|
||||
}
|
||||
|
||||
child_allocation.y = allocation->y;
|
||||
@ -1166,8 +1162,7 @@ gtk_header_bar_size_allocate (GtkWidget *widget,
|
||||
else
|
||||
child_allocation.x = allocation->x + allocation->width - start_width + priv->spacing;
|
||||
child_allocation.width = start_width - priv->spacing;
|
||||
gtk_widget_size_allocate (priv->titlebar_start_box, &child_allocation, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->titlebar_start_box, &child_allocation, baseline);
|
||||
}
|
||||
|
||||
if (priv->titlebar_end_box)
|
||||
@ -1178,8 +1173,7 @@ gtk_header_bar_size_allocate (GtkWidget *widget,
|
||||
else
|
||||
child_allocation.x = allocation->x + allocation->width - end_width + priv->spacing;
|
||||
child_allocation.width = end_width - priv->spacing;
|
||||
gtk_widget_size_allocate (priv->titlebar_end_box, &child_allocation, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->titlebar_end_box, &child_allocation, baseline);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -154,8 +154,7 @@ static void gtk_icon_view_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_icon_view_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_icon_view_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
static void gtk_icon_view_motion (GtkEventController *controller,
|
||||
@ -1595,18 +1594,16 @@ gtk_icon_view_allocate_children (GtkIconView *icon_view)
|
||||
for (list = icon_view->priv->children; list; list = list->next)
|
||||
{
|
||||
GtkIconViewChild *child = list->data;
|
||||
GtkAllocation clip;
|
||||
|
||||
/* totally ignore our child's requisition */
|
||||
gtk_widget_size_allocate (child->widget, &child->area, -1, &clip);
|
||||
gtk_widget_size_allocate (child->widget, &child->area, -1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_icon_view_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkIconView *icon_view = GTK_ICON_VIEW (widget);
|
||||
|
||||
|
@ -94,10 +94,6 @@ struct _GtkImagePrivate
|
||||
|
||||
static void gtk_image_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
static void gtk_image_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
static void gtk_image_unrealize (GtkWidget *widget);
|
||||
static void gtk_image_measure (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
@ -155,7 +151,6 @@ gtk_image_class_init (GtkImageClass *class)
|
||||
widget_class = GTK_WIDGET_CLASS (class);
|
||||
widget_class->snapshot = gtk_image_snapshot;
|
||||
widget_class->measure = gtk_image_measure;
|
||||
widget_class->size_allocate = gtk_image_size_allocate;
|
||||
widget_class->unrealize = gtk_image_unrealize;
|
||||
widget_class->style_updated = gtk_image_style_updated;
|
||||
|
||||
@ -1094,20 +1089,6 @@ gtk_image_new (void)
|
||||
return g_object_new (GTK_TYPE_IMAGE, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_image_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
{
|
||||
_gtk_style_context_get_icon_extents (gtk_widget_get_style_context (widget),
|
||||
out_clip,
|
||||
allocation->x,
|
||||
allocation->y,
|
||||
allocation->width,
|
||||
allocation->height);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_image_unrealize (GtkWidget *widget)
|
||||
{
|
||||
|
@ -406,8 +406,7 @@ static void gtk_label_finalize (GObject *object);
|
||||
static void gtk_label_destroy (GtkWidget *widget);
|
||||
static void gtk_label_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_label_state_flags_changed (GtkWidget *widget,
|
||||
GtkStateFlags prev_state);
|
||||
static void gtk_label_style_updated (GtkWidget *widget);
|
||||
@ -3653,33 +3652,10 @@ get_layout_location (GtkLabel *label,
|
||||
*yp = y;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_get_ink_rect (GtkLabel *label,
|
||||
GdkRectangle *rect)
|
||||
{
|
||||
GtkLabelPrivate *priv = gtk_label_get_instance_private (label);
|
||||
GtkStyleContext *context;
|
||||
PangoRectangle ink_rect;
|
||||
GtkBorder extents;
|
||||
int x, y;
|
||||
|
||||
gtk_label_ensure_layout (label);
|
||||
get_layout_location (label, &x, &y);
|
||||
pango_layout_get_pixel_extents (priv->layout, &ink_rect, NULL);
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (label));
|
||||
_gtk_css_shadows_value_get_extents (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_TEXT_SHADOW), &extents);
|
||||
|
||||
rect->x = x + ink_rect.x - extents.left;
|
||||
rect->width = ink_rect.width + extents.left + extents.right;
|
||||
rect->y = y + ink_rect.y - extents.top;
|
||||
rect->height = ink_rect.height + extents.top + extents.bottom;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_label_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkLabel *label = GTK_LABEL (widget);
|
||||
GtkLabelPrivate *priv = gtk_label_get_instance_private (label);
|
||||
@ -3692,8 +3668,6 @@ gtk_label_size_allocate (GtkWidget *widget,
|
||||
else
|
||||
pango_layout_set_width (priv->layout, -1);
|
||||
}
|
||||
|
||||
gtk_label_get_ink_rect (label, out_clip);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -119,8 +119,7 @@ static void gtk_layout_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_layout_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_layout_add (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
static void gtk_layout_remove (GtkContainer *container,
|
||||
@ -726,8 +725,7 @@ gtk_layout_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_layout_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkLayout *layout = GTK_LAYOUT (widget);
|
||||
GtkLayoutPrivate *priv = layout->priv;
|
||||
@ -748,7 +746,6 @@ gtk_layout_size_allocate (GtkWidget *widget,
|
||||
GtkLayoutChild *child = tmp_list->data;
|
||||
GtkAllocation allocation;
|
||||
GtkRequisition requisition;
|
||||
GtkAllocation child_clip;
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
|
||||
@ -759,7 +756,7 @@ gtk_layout_size_allocate (GtkWidget *widget,
|
||||
allocation.width = requisition.width;
|
||||
allocation.height = requisition.height;
|
||||
|
||||
gtk_widget_size_allocate (child->widget, &allocation, -1, &child_clip);
|
||||
gtk_widget_size_allocate (child->widget, &allocation, -1);
|
||||
}
|
||||
|
||||
gtk_layout_set_hadjustment_values (layout);
|
||||
|
@ -439,11 +439,10 @@ gtk_level_bar_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_level_bar_allocate_trough_continuous (GtkLevelBar *self,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkLevelBarPrivate *priv = gtk_level_bar_get_instance_private (self);
|
||||
GtkAllocation block_area, clip;
|
||||
GtkAllocation block_area;
|
||||
gdouble fill_percentage;
|
||||
gboolean inverted;
|
||||
int block_min;
|
||||
@ -453,8 +452,7 @@ gtk_level_bar_allocate_trough_continuous (GtkLevelBar *self,
|
||||
/* allocate the empty (unfilled) part */
|
||||
gtk_widget_size_allocate (priv->block_widget[inverted ? 0 : 1],
|
||||
allocation,
|
||||
baseline,
|
||||
out_clip);
|
||||
baseline);
|
||||
|
||||
if (priv->cur_value == 0)
|
||||
return;
|
||||
@ -488,19 +486,16 @@ gtk_level_bar_allocate_trough_continuous (GtkLevelBar *self,
|
||||
|
||||
gtk_widget_size_allocate (priv->block_widget[inverted ? 1 : 0],
|
||||
&block_area,
|
||||
baseline,
|
||||
&clip);
|
||||
gdk_rectangle_intersect (out_clip, &clip, out_clip);
|
||||
baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_level_bar_allocate_trough_discrete (GtkLevelBar *self,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkLevelBarPrivate *priv = gtk_level_bar_get_instance_private (self);
|
||||
GtkAllocation block_area, clip;
|
||||
GtkAllocation block_area;
|
||||
gint num_blocks, i;
|
||||
gint block_width, block_height;
|
||||
|
||||
@ -530,9 +525,7 @@ gtk_level_bar_allocate_trough_discrete (GtkLevelBar *self,
|
||||
{
|
||||
gtk_widget_size_allocate (priv->block_widget[i],
|
||||
&block_area,
|
||||
baseline,
|
||||
&clip);
|
||||
gdk_rectangle_intersect (out_clip, &clip, out_clip);
|
||||
baseline);
|
||||
|
||||
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
block_area.x += block_area.width;
|
||||
@ -544,28 +537,26 @@ gtk_level_bar_allocate_trough_discrete (GtkLevelBar *self,
|
||||
static void
|
||||
gtk_level_bar_allocate_trough (GtkGizmo *gizmo,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (gizmo);
|
||||
GtkLevelBar *self = GTK_LEVEL_BAR (gtk_widget_get_parent (widget));
|
||||
GtkLevelBarPrivate *priv = gtk_level_bar_get_instance_private (self);
|
||||
|
||||
if (priv->bar_mode == GTK_LEVEL_BAR_MODE_CONTINUOUS)
|
||||
gtk_level_bar_allocate_trough_continuous (self, allocation, baseline, out_clip);
|
||||
gtk_level_bar_allocate_trough_continuous (self, allocation, baseline);
|
||||
else
|
||||
gtk_level_bar_allocate_trough_discrete (self, allocation, baseline, out_clip);
|
||||
gtk_level_bar_allocate_trough_discrete (self, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_level_bar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkLevelBarPrivate *priv = gtk_level_bar_get_instance_private (GTK_LEVEL_BAR (widget));
|
||||
|
||||
gtk_widget_size_allocate (priv->trough_widget, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->trough_widget, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -228,8 +228,7 @@ static GType gtk_list_box_child_type (GtkContai
|
||||
static GtkSizeRequestMode gtk_list_box_get_request_mode (GtkWidget *widget);
|
||||
static void gtk_list_box_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_list_box_drag_leave (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
guint time_);
|
||||
@ -2499,11 +2498,9 @@ gtk_list_box_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_list_box_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkListBoxPrivate *priv = BOX_PRIV (widget);
|
||||
GtkAllocation child_clip;
|
||||
GtkAllocation child_allocation;
|
||||
GtkAllocation header_allocation;
|
||||
GtkListBoxRow *row;
|
||||
@ -2528,8 +2525,7 @@ gtk_list_box_size_allocate (GtkWidget *widget,
|
||||
&child_min, NULL, NULL, NULL);
|
||||
header_allocation.height = allocation->height;
|
||||
header_allocation.y = child_allocation.y;
|
||||
gtk_widget_size_allocate (priv->placeholder, &header_allocation, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->placeholder, &header_allocation, -1);
|
||||
child_allocation.y += child_min;
|
||||
}
|
||||
|
||||
@ -2554,9 +2550,7 @@ gtk_list_box_size_allocate (GtkWidget *widget,
|
||||
header_allocation.y = child_allocation.y;
|
||||
gtk_widget_size_allocate (ROW_PRIV (row)->header,
|
||||
&header_allocation,
|
||||
-1,
|
||||
&child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
-1);
|
||||
child_allocation.y += child_min;
|
||||
}
|
||||
|
||||
@ -2568,8 +2562,7 @@ gtk_list_box_size_allocate (GtkWidget *widget,
|
||||
child_allocation.height = child_min;
|
||||
|
||||
ROW_PRIV (row)->height = child_allocation.height;
|
||||
gtk_widget_size_allocate (GTK_WIDGET (row), &child_allocation, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (GTK_WIDGET (row), &child_allocation, -1);
|
||||
child_allocation.y += child_min;
|
||||
}
|
||||
}
|
||||
|
@ -186,12 +186,11 @@ gtk_media_controls_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_media_controls_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkMediaControls *controls = GTK_MEDIA_CONTROLS (widget);
|
||||
|
||||
gtk_widget_size_allocate (controls->box, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (controls->box, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -234,8 +234,7 @@ static void gtk_menu_realize (GtkWidget *widget);
|
||||
static void gtk_menu_unrealize (GtkWidget *widget);
|
||||
static void gtk_menu_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_menu_show (GtkWidget *widget);
|
||||
static void gtk_menu_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
@ -2634,8 +2633,7 @@ calculate_line_heights (GtkMenu *menu,
|
||||
static void
|
||||
gtk_menu_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkMenu *menu;
|
||||
GtkMenuPrivate *priv;
|
||||
@ -2681,13 +2679,13 @@ gtk_menu_size_allocate (GtkWidget *widget,
|
||||
arrow_allocation.height = arrow_border.top;
|
||||
|
||||
if (priv->upper_arrow_visible)
|
||||
gtk_widget_size_allocate (priv->top_arrow_widget, &arrow_allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (priv->top_arrow_widget, &arrow_allocation, -1);
|
||||
|
||||
arrow_allocation.y = height - y - arrow_border.bottom;
|
||||
arrow_allocation.height = arrow_border.bottom;
|
||||
|
||||
if (priv->lower_arrow_visible)
|
||||
gtk_widget_size_allocate (priv->bottom_arrow_widget, &arrow_allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (priv->bottom_arrow_widget, &arrow_allocation, -1);
|
||||
|
||||
width = MAX (1, width);
|
||||
height = MAX (1, height);
|
||||
@ -2732,7 +2730,7 @@ gtk_menu_size_allocate (GtkWidget *widget,
|
||||
gtk_menu_item_toggle_size_allocate (GTK_MENU_ITEM (child),
|
||||
priv->toggle_size);
|
||||
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,8 +89,7 @@ static void gtk_menu_bar_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_menu_bar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_menu_bar_hierarchy_changed (GtkWidget *widget,
|
||||
GtkWidget *old_toplevel);
|
||||
static gint gtk_menu_bar_get_popup_delay (GtkMenuShell *menu_shell);
|
||||
@ -341,8 +340,7 @@ gtk_menu_bar_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_menu_bar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkMenuBar *menu_bar = GTK_MENU_BAR (widget);
|
||||
GtkMenuBarPrivate *priv = menu_bar->priv;
|
||||
@ -414,7 +412,7 @@ gtk_menu_bar_size_allocate (GtkWidget *widget,
|
||||
else
|
||||
child_allocation.x += remaining_space.width;
|
||||
|
||||
gtk_widget_size_allocate (request->data, &child_allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (request->data, &child_allocation, -1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -468,7 +466,7 @@ gtk_menu_bar_size_allocate (GtkWidget *widget,
|
||||
else
|
||||
child_allocation.y += remaining_space.height;
|
||||
|
||||
gtk_widget_size_allocate (request->data, &child_allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (request->data, &child_allocation, -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -254,14 +254,11 @@ gtk_menu_item_actionable_interface_init (GtkActionableInterface *iface)
|
||||
static void
|
||||
gtk_menu_item_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkMenuItem *menu_item = GTK_MENU_ITEM (widget);
|
||||
GtkMenuItemPrivate *priv = menu_item->priv;
|
||||
GtkAllocation child_allocation;
|
||||
GtkAllocation arrow_clip = { 0 };
|
||||
GtkAllocation child_clip = *allocation;
|
||||
GtkTextDirection direction;
|
||||
GtkPackDirection child_pack_dir;
|
||||
GtkWidget *child;
|
||||
@ -331,14 +328,12 @@ gtk_menu_item_size_allocate (GtkWidget *widget,
|
||||
arrow_alloc.y = child_allocation.y +
|
||||
(child_allocation.height - arrow_alloc.height) / 2;
|
||||
|
||||
gtk_widget_size_allocate(priv->arrow_widget, &arrow_alloc, baseline, &arrow_clip);
|
||||
gdk_rectangle_union (out_clip, &arrow_clip, out_clip);
|
||||
gtk_widget_size_allocate(priv->arrow_widget, &arrow_alloc, baseline);
|
||||
}
|
||||
|
||||
child_allocation.width = MAX (1, child_allocation.width);
|
||||
|
||||
gtk_widget_size_allocate (child, &child_allocation, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, baseline);
|
||||
}
|
||||
|
||||
if (priv->submenu)
|
||||
|
@ -752,19 +752,16 @@ gtk_model_button_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_model_button_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
if (GTK_MODEL_BUTTON (widget)->iconic)
|
||||
{
|
||||
GTK_WIDGET_CLASS (gtk_model_button_parent_class)->size_allocate (widget,
|
||||
allocation,
|
||||
baseline,
|
||||
out_clip);
|
||||
baseline);
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkAllocation child_clip = *allocation;
|
||||
GtkModelButton *button;
|
||||
GtkAllocation child_allocation;
|
||||
GtkWidget *child;
|
||||
@ -795,8 +792,7 @@ gtk_model_button_size_allocate (GtkWidget *widget,
|
||||
child_allocation.width = check_nat_width;
|
||||
child_allocation.height = check_nat_height;
|
||||
|
||||
gtk_widget_size_allocate (button->indicator_widget, &child_allocation, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (button->indicator_widget, &child_allocation, baseline);
|
||||
|
||||
if (child && gtk_widget_get_visible (child))
|
||||
{
|
||||
@ -823,8 +819,7 @@ gtk_model_button_size_allocate (GtkWidget *widget,
|
||||
if (baseline != -1)
|
||||
baseline -= border.top;
|
||||
|
||||
gtk_widget_size_allocate (child, &child_allocation, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, baseline);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -372,8 +372,7 @@ static void gtk_notebook_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_notebook_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_notebook_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
static gboolean gtk_notebook_popup_menu (GtkWidget *widget);
|
||||
@ -463,8 +462,7 @@ static void gtk_notebook_measure_tabs (GtkGizmo *gizmo,
|
||||
gint *natural_baseline);
|
||||
static void gtk_notebook_allocate_tabs (GtkGizmo *gizmo,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static gboolean gtk_notebook_snapshot_tabs (GtkGizmo *gizmo,
|
||||
GtkSnapshot *snapshot);
|
||||
|
||||
@ -2064,8 +2062,7 @@ gtk_notebook_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_notebook_allocate_tabs (GtkGizmo *gizmo,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkWidget *widget = gtk_widget_get_parent (gtk_widget_get_parent (GTK_WIDGET (gizmo)));
|
||||
GtkNotebook *notebook = GTK_NOTEBOOK (gtk_widget_get_parent (widget));
|
||||
@ -2076,13 +2073,12 @@ gtk_notebook_allocate_tabs (GtkGizmo *gizmo,
|
||||
static void
|
||||
gtk_notebook_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
|
||||
GtkNotebookPrivate *priv = notebook->priv;
|
||||
|
||||
gtk_widget_size_allocate (priv->box, allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (priv->box, allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -3929,8 +3925,7 @@ measure_tab (GtkGizmo *gizmo,
|
||||
static void
|
||||
allocate_tab (GtkGizmo *gizmo,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkNotebook *notebook = g_object_get_data (G_OBJECT (gizmo), "notebook");
|
||||
GtkNotebookPrivate *priv = notebook->priv;
|
||||
@ -3977,7 +3972,7 @@ allocate_tab (GtkGizmo *gizmo,
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (page->tab_label, &child_allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (page->tab_label, &child_allocation, baseline);
|
||||
}
|
||||
|
||||
static gint
|
||||
@ -4525,7 +4520,7 @@ gtk_notebook_allocate_arrows (GtkNotebook *notebook,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkNotebookPrivate *priv = notebook->priv;
|
||||
GtkAllocation arrow_allocation, arrow_clip;
|
||||
GtkAllocation arrow_allocation;
|
||||
gint size1, size2, min, nat;
|
||||
guint i, ii;
|
||||
|
||||
@ -4553,8 +4548,7 @@ gtk_notebook_allocate_arrows (GtkNotebook *notebook,
|
||||
arrow_allocation.width = min;
|
||||
gtk_widget_size_allocate (priv->arrow_widget[ii],
|
||||
&arrow_allocation,
|
||||
-1,
|
||||
&arrow_clip);
|
||||
-1);
|
||||
allocation->x += min;
|
||||
allocation->width -= min;
|
||||
}
|
||||
@ -4564,8 +4558,7 @@ gtk_notebook_allocate_arrows (GtkNotebook *notebook,
|
||||
arrow_allocation.width = min;
|
||||
gtk_widget_size_allocate (priv->arrow_widget[ii],
|
||||
&arrow_allocation,
|
||||
-1,
|
||||
&arrow_clip);
|
||||
-1);
|
||||
allocation->width -= min;
|
||||
}
|
||||
}
|
||||
@ -4587,11 +4580,11 @@ gtk_notebook_allocate_arrows (GtkNotebook *notebook,
|
||||
arrow_allocation.width = size1;
|
||||
arrow_allocation.height = min;
|
||||
if (priv->arrow_widget[0])
|
||||
gtk_widget_size_allocate (priv->arrow_widget[0], &arrow_allocation, -1, &arrow_clip);
|
||||
gtk_widget_size_allocate (priv->arrow_widget[0], &arrow_allocation, -1);
|
||||
arrow_allocation.x += size1;
|
||||
arrow_allocation.width = size2;
|
||||
if (priv->arrow_widget[1])
|
||||
gtk_widget_size_allocate (priv->arrow_widget[1], &arrow_allocation, -1, &arrow_clip);
|
||||
gtk_widget_size_allocate (priv->arrow_widget[1], &arrow_allocation, -1);
|
||||
allocation->y += min;
|
||||
allocation->height -= min;
|
||||
}
|
||||
@ -4609,11 +4602,11 @@ gtk_notebook_allocate_arrows (GtkNotebook *notebook,
|
||||
arrow_allocation.width = size1;
|
||||
arrow_allocation.height = min;
|
||||
if (priv->arrow_widget[2])
|
||||
gtk_widget_size_allocate (priv->arrow_widget[2], &arrow_allocation, -1, &arrow_clip);
|
||||
gtk_widget_size_allocate (priv->arrow_widget[2], &arrow_allocation, -1);
|
||||
arrow_allocation.x += size1;
|
||||
arrow_allocation.width = size2;
|
||||
if (priv->arrow_widget[3])
|
||||
gtk_widget_size_allocate (priv->arrow_widget[3], &arrow_allocation, -1, &arrow_clip);
|
||||
gtk_widget_size_allocate (priv->arrow_widget[3], &arrow_allocation, -1);
|
||||
allocation->height -= min;
|
||||
}
|
||||
break;
|
||||
@ -4959,7 +4952,7 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
|
||||
GtkPositionType tab_pos;
|
||||
gint left_x, right_x, top_y, bottom_y, anchor;
|
||||
gboolean gap_left, packing_changed;
|
||||
GtkAllocation child_allocation, drag_allocation, page_clip;
|
||||
GtkAllocation child_allocation, drag_allocation;
|
||||
GtkOrientation tab_expand_orientation;
|
||||
|
||||
g_assert (priv->cur_page != NULL);
|
||||
@ -5141,18 +5134,18 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
|
||||
{
|
||||
GtkAllocation fixed_allocation = { priv->drag_surface_x, priv->drag_surface_y,
|
||||
child_allocation.width, child_allocation.height };
|
||||
gtk_widget_size_allocate (page->tab_widget, &fixed_allocation, -1, &page_clip);
|
||||
gtk_widget_size_allocate (page->tab_widget, &fixed_allocation, -1);
|
||||
}
|
||||
else if (page == priv->detached_tab && priv->operation == DRAG_OPERATION_DETACH)
|
||||
{
|
||||
/* needs to be allocated at 0,0
|
||||
* to be shown in the drag window */
|
||||
GtkAllocation fixed_allocation = { 0, 0, child_allocation.width, child_allocation.height };
|
||||
gtk_widget_size_allocate (page->tab_widget, &fixed_allocation, -1, &page_clip);
|
||||
gtk_widget_size_allocate (page->tab_widget, &fixed_allocation, -1);
|
||||
}
|
||||
else if (gtk_notebook_page_tab_label_is_visible (page))
|
||||
{
|
||||
gtk_widget_size_allocate (page->tab_widget, &child_allocation, -1, &page_clip);
|
||||
gtk_widget_size_allocate (page->tab_widget, &child_allocation, -1);
|
||||
}
|
||||
|
||||
/* calculate whether to leave a gap based on reorder operation or not */
|
||||
|
@ -287,7 +287,6 @@ gtk_overlay_child_allocate (GtkOverlay *overlay,
|
||||
GtkOverlayChild *child)
|
||||
{
|
||||
GtkAllocation child_allocation;
|
||||
GtkAllocation child_clip;
|
||||
|
||||
if (!gtk_widget_get_visible (widget))
|
||||
return;
|
||||
@ -295,14 +294,13 @@ gtk_overlay_child_allocate (GtkOverlay *overlay,
|
||||
gtk_overlay_compute_child_allocation (overlay, widget, child, &child_allocation);
|
||||
|
||||
gtk_overlay_child_update_style_classes (overlay, widget, &child_allocation);
|
||||
gtk_widget_size_allocate (widget, &child_allocation, -1, &child_clip);
|
||||
gtk_widget_size_allocate (widget, &child_allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_overlay_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkOverlay *overlay = GTK_OVERLAY (widget);
|
||||
GtkWidget *child;
|
||||
@ -310,7 +308,7 @@ gtk_overlay_size_allocate (GtkWidget *widget,
|
||||
|
||||
main_widget = gtk_bin_get_child (GTK_BIN (overlay));
|
||||
if (main_widget && gtk_widget_get_visible (main_widget))
|
||||
gtk_widget_size_allocate (main_widget, allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (main_widget, allocation, -1);
|
||||
|
||||
for (child = gtk_widget_get_first_child (widget);
|
||||
child != NULL;
|
||||
|
@ -217,8 +217,7 @@ static void gtk_paned_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_paned_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_paned_unrealize (GtkWidget *widget);
|
||||
static void gtk_paned_direction_changed (GtkWidget *widget,
|
||||
GtkTextDirection previous_direction);
|
||||
@ -1226,12 +1225,10 @@ gtk_paned_set_child_visible (GtkPaned *paned,
|
||||
static void
|
||||
gtk_paned_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkPaned *paned = GTK_PANED (widget);
|
||||
GtkPanedPrivate *priv = gtk_paned_get_instance_private (paned);
|
||||
GtkAllocation child_clip;
|
||||
|
||||
if (priv->child1 && gtk_widget_get_visible (priv->child1) &&
|
||||
priv->child2 && gtk_widget_get_visible (priv->child2))
|
||||
@ -1338,8 +1335,7 @@ gtk_paned_size_allocate (GtkWidget *widget,
|
||||
child2_allocation.height = child2_height;
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (priv->handle_widget, &priv->handle_pos, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->handle_widget, &priv->handle_pos, -1);
|
||||
|
||||
if (gtk_widget_get_mapped (widget) &&
|
||||
(old_handle_pos.x != priv->handle_pos.x ||
|
||||
@ -1351,11 +1347,9 @@ gtk_paned_size_allocate (GtkWidget *widget,
|
||||
}
|
||||
|
||||
|
||||
gtk_widget_size_allocate (priv->child1, &child1_allocation, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->child1, &child1_allocation, -1);
|
||||
|
||||
gtk_widget_size_allocate (priv->child2, &child2_allocation, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->child2, &child2_allocation, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1371,16 +1365,14 @@ gtk_paned_size_allocate (GtkWidget *widget,
|
||||
gtk_paned_set_child_visible (paned, CHILD1, TRUE);
|
||||
gtk_paned_set_child_visible (paned, CHILD2, FALSE);
|
||||
|
||||
gtk_widget_size_allocate (priv->child1, &child_allocation, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->child1, &child_allocation, -1);
|
||||
}
|
||||
else if (priv->child2 && gtk_widget_get_visible (priv->child2))
|
||||
{
|
||||
gtk_paned_set_child_visible (paned, CHILD1, FALSE);
|
||||
gtk_paned_set_child_visible (paned, CHILD2, TRUE);
|
||||
|
||||
gtk_widget_size_allocate (priv->child2, &child_allocation, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->child2, &child_allocation, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -138,8 +138,7 @@ static void gtk_path_bar_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_path_bar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_path_bar_add (GtkContainer *container,
|
||||
GtkWidget *widget);
|
||||
static void gtk_path_bar_remove (GtkContainer *container,
|
||||
@ -484,8 +483,7 @@ gtk_path_bar_update_slider_buttons (GtkPathBar *path_bar)
|
||||
static void
|
||||
gtk_path_bar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkWidget *child;
|
||||
GtkPathBar *path_bar = GTK_PATH_BAR (widget);
|
||||
@ -498,7 +496,6 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
|
||||
gint up_slider_offset = 0;
|
||||
gint down_slider_offset = 0;
|
||||
GtkRequisition child_requisition;
|
||||
GtkAllocation child_clip;
|
||||
|
||||
/* No path is set; we don't have to allocate anything. */
|
||||
if (path_bar->priv->button_list == NULL)
|
||||
@ -653,8 +650,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
|
||||
gtk_widget_set_tooltip_text (child, NULL);
|
||||
|
||||
gtk_widget_set_child_visible (child, TRUE);
|
||||
gtk_widget_size_allocate (child, &child_allocation, baseline, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, baseline);
|
||||
|
||||
if (direction == GTK_TEXT_DIR_RTL)
|
||||
{
|
||||
@ -685,8 +681,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
|
||||
child_allocation.x = up_slider_offset + allocation->x;
|
||||
gtk_widget_size_allocate (path_bar->priv->up_slider_button,
|
||||
&child_allocation,
|
||||
-1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
-1);
|
||||
|
||||
gtk_widget_set_child_visible (path_bar->priv->up_slider_button, TRUE);
|
||||
gtk_widget_show (path_bar->priv->up_slider_button);
|
||||
@ -706,8 +701,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
|
||||
|
||||
gtk_widget_size_allocate (path_bar->priv->down_slider_button,
|
||||
&child_allocation,
|
||||
-1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
-1);
|
||||
|
||||
gtk_widget_set_child_visible (path_bar->priv->down_slider_button, TRUE);
|
||||
gtk_widget_show (path_bar->priv->down_slider_button);
|
||||
|
@ -246,14 +246,13 @@ measure_contents (GtkGizmo *gizmo,
|
||||
static void
|
||||
allocate_contents (GtkGizmo *gizmo,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkPopover *popover = GTK_POPOVER (gtk_widget_get_parent (GTK_WIDGET (gizmo)));
|
||||
GtkWidget *child = gtk_bin_get_child (GTK_BIN (popover));
|
||||
|
||||
if (child)
|
||||
gtk_widget_size_allocate (child, allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (child, allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1325,8 +1324,7 @@ gtk_popover_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_popover_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkPopover *popover = GTK_POPOVER (widget);
|
||||
GtkPopoverPrivate *priv = gtk_popover_get_instance_private (popover);
|
||||
@ -1359,7 +1357,7 @@ gtk_popover_size_allocate (GtkWidget *widget,
|
||||
break;
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (priv->contents_widget, &child_alloc, -1, out_clip);
|
||||
gtk_widget_size_allocate (priv->contents_widget, &child_alloc, -1);
|
||||
|
||||
if (gtk_widget_get_realized (widget))
|
||||
{
|
||||
@ -1778,11 +1776,10 @@ _gtk_popover_parent_unmap (GtkWidget *widget,
|
||||
}
|
||||
|
||||
static void
|
||||
_gtk_popover_parent_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip,
|
||||
GtkPopover *popover)
|
||||
gtk_popover_parent_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkPopover *popover)
|
||||
{
|
||||
gtk_popover_update_position (popover);
|
||||
}
|
||||
@ -1972,7 +1969,7 @@ gtk_popover_update_relative_to (GtkPopover *popover,
|
||||
popover);
|
||||
priv->size_allocate_id =
|
||||
g_signal_connect (priv->widget, "size-allocate",
|
||||
G_CALLBACK (_gtk_popover_parent_size_allocate),
|
||||
G_CALLBACK (gtk_popover_parent_size_allocate),
|
||||
popover);
|
||||
priv->unmap_id =
|
||||
g_signal_connect (priv->widget, "unmap",
|
||||
|
@ -144,8 +144,7 @@ static void gtk_progress_bar_get_property (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
static void gtk_progress_bar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
|
||||
static void gtk_progress_bar_act_mode_enter (GtkProgressBar *progress);
|
||||
static void gtk_progress_bar_act_mode_leave (GtkProgressBar *progress);
|
||||
@ -373,8 +372,7 @@ update_node_classes (GtkProgressBar *pbar)
|
||||
static void
|
||||
allocate_trough (GtkGizmo *gizmo,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
|
||||
{
|
||||
GtkProgressBar *pbar = GTK_PROGRESS_BAR (gtk_widget_get_parent (GTK_WIDGET (gizmo)));
|
||||
@ -442,7 +440,7 @@ allocate_trough (GtkGizmo *gizmo,
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (priv->progress_widget, &alloc,-1, out_clip);
|
||||
gtk_widget_size_allocate (priv->progress_widget, &alloc,-1);
|
||||
|
||||
}
|
||||
|
||||
@ -620,15 +618,12 @@ get_current_text (GtkProgressBar *pbar)
|
||||
static void
|
||||
gtk_progress_bar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkAllocation child_clip = *allocation;
|
||||
GtkProgressBarPrivate *priv = gtk_progress_bar_get_instance_private (GTK_PROGRESS_BAR (widget));
|
||||
gint bar_width, bar_height;
|
||||
gint text_width, text_height, text_min, text_nat;
|
||||
GtkAllocation alloc;
|
||||
GtkAllocation text_clip;
|
||||
|
||||
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
@ -650,8 +645,7 @@ gtk_progress_bar_size_allocate (GtkWidget *widget,
|
||||
alloc.width = bar_width;
|
||||
alloc.height = bar_height;
|
||||
|
||||
gtk_widget_size_allocate (priv->trough_widget, &alloc, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->trough_widget, &alloc, -1);
|
||||
|
||||
if (!priv->show_text)
|
||||
return;
|
||||
@ -680,8 +674,7 @@ gtk_progress_bar_size_allocate (GtkWidget *widget,
|
||||
alloc.height = text_height;
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (priv->label, &alloc, -1, &text_clip);
|
||||
gdk_rectangle_union (out_clip, &text_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->label, &alloc, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -164,8 +164,7 @@ static void gtk_range_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_range_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_range_unmap (GtkWidget *widget);
|
||||
|
||||
static void gtk_range_multipress_gesture_pressed (GtkGestureMultiPress *gesture,
|
||||
@ -235,8 +234,7 @@ static void gtk_range_measure_trough (GtkGizmo *gizmo,
|
||||
gint *natural_baseline);
|
||||
static void gtk_range_allocate_trough (GtkGizmo *gizmo,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static gboolean gtk_range_render_trough (GtkGizmo *gizmo,
|
||||
GtkSnapshot *snapshot);
|
||||
|
||||
@ -1367,8 +1365,7 @@ gtk_range_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_range_allocate_trough (GtkGizmo *gizmo,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkWidget *widget = gtk_widget_get_parent (GTK_WIDGET (gizmo));
|
||||
GtkRange *range = GTK_RANGE (widget);
|
||||
@ -1386,7 +1383,7 @@ gtk_range_allocate_trough (GtkGizmo *gizmo,
|
||||
gtk_adjustment_get_value (priv->adjustment),
|
||||
&slider_alloc);
|
||||
|
||||
gtk_widget_size_allocate (priv->slider_widget, &slider_alloc, -1, out_clip);
|
||||
gtk_widget_size_allocate (priv->slider_widget, &slider_alloc, -1);
|
||||
priv->slider_x = slider_alloc.x;
|
||||
priv->slider_y = slider_alloc.y;
|
||||
|
||||
@ -1399,7 +1396,7 @@ gtk_range_allocate_trough (GtkGizmo *gizmo,
|
||||
upper - page_size - lower != 0)
|
||||
{
|
||||
double level, fill;
|
||||
GtkAllocation fill_alloc, fill_clip;
|
||||
GtkAllocation fill_alloc;
|
||||
|
||||
fill_alloc = *allocation;
|
||||
|
||||
@ -1422,13 +1419,12 @@ gtk_range_allocate_trough (GtkGizmo *gizmo,
|
||||
fill_alloc.y += allocation->height - fill_alloc.height;
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (priv->fill_widget, &fill_alloc, -1, &fill_clip);
|
||||
gdk_rectangle_union (out_clip, &fill_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->fill_widget, &fill_alloc, -1);
|
||||
}
|
||||
|
||||
if (priv->has_origin)
|
||||
{
|
||||
GtkAllocation highlight_alloc, highlight_clip;
|
||||
GtkAllocation highlight_alloc;
|
||||
int min, nat;
|
||||
|
||||
gtk_widget_measure (priv->highlight_widget,
|
||||
@ -1461,7 +1457,7 @@ gtk_range_allocate_trough (GtkGizmo *gizmo,
|
||||
highlight_alloc.height = MAX (min, allocation->height* value);
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (priv->highlight_widget, &highlight_alloc, -1, &highlight_clip);
|
||||
gtk_widget_size_allocate (priv->highlight_widget, &highlight_alloc, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1555,8 +1551,7 @@ clamp_dimensions (const GtkAllocation *allocation,
|
||||
static void
|
||||
gtk_range_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkRange *range = GTK_RANGE (widget);
|
||||
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
|
||||
@ -1586,7 +1581,7 @@ gtk_range_size_allocate (GtkWidget *widget,
|
||||
box_alloc.width = box_min_width;
|
||||
box_alloc.height = box_min_height;
|
||||
|
||||
gtk_widget_size_allocate (priv->trough_widget, &box_alloc, -1, out_clip);
|
||||
gtk_widget_size_allocate (priv->trough_widget, &box_alloc, -1);
|
||||
|
||||
/* TODO: we should compute a proper clip from get_range_border(),
|
||||
* but this will at least give us outset shadows.
|
||||
|
@ -99,8 +99,7 @@ static void gtk_revealer_real_add (GtkContainer
|
||||
GtkWidget *child);
|
||||
static void gtk_revealer_real_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_revealer_measure (GtkWidget *widget,
|
||||
GtkOrientation orientation,
|
||||
int for_size,
|
||||
@ -366,8 +365,7 @@ gtk_revealer_real_add (GtkContainer *container,
|
||||
static void
|
||||
gtk_revealer_real_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkRevealer *revealer = GTK_REVEALER (widget);
|
||||
GtkWidget *child;
|
||||
@ -378,7 +376,7 @@ gtk_revealer_real_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
gtk_revealer_get_child_allocation (revealer, allocation, &child_allocation);
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -323,8 +323,7 @@ gtk_scale_notify (GObject *object,
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_scale_allocate_value (GtkScale *scale,
|
||||
GtkAllocation *out_clip)
|
||||
gtk_scale_allocate_value (GtkScale *scale)
|
||||
{
|
||||
GtkScalePrivate *priv = gtk_scale_get_instance_private (scale);
|
||||
GtkWidget *widget = GTK_WIDGET (scale);
|
||||
@ -406,14 +405,13 @@ gtk_scale_allocate_value (GtkScale *scale,
|
||||
}
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (priv->value_widget, &value_alloc, -1, out_clip);
|
||||
gtk_widget_size_allocate (priv->value_widget, &value_alloc, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_scale_allocate_mark (GtkGizmo *gizmo,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (gizmo);
|
||||
GtkScale *scale = GTK_SCALE (gtk_widget_get_parent (gtk_widget_get_parent (widget)));
|
||||
@ -453,11 +451,11 @@ gtk_scale_allocate_mark (GtkGizmo *gizmo,
|
||||
indicator_alloc.height = indicator_height;
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (mark->indicator_widget, &indicator_alloc, baseline, out_clip);
|
||||
gtk_widget_size_allocate (mark->indicator_widget, &indicator_alloc, baseline);
|
||||
|
||||
if (mark->label_widget)
|
||||
{
|
||||
GtkAllocation label_alloc, label_clip;
|
||||
GtkAllocation label_alloc;
|
||||
|
||||
label_alloc = *allocation;
|
||||
|
||||
@ -474,16 +472,14 @@ gtk_scale_allocate_mark (GtkGizmo *gizmo,
|
||||
label_alloc.x = indicator_alloc.x + indicator_alloc.width;
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (mark->label_widget, &label_alloc, baseline, &label_clip);
|
||||
gdk_rectangle_union (out_clip, &label_clip, out_clip);
|
||||
gtk_widget_size_allocate (mark->label_widget, &label_alloc, baseline);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_scale_allocate_marks (GtkGizmo *gizmo,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (gizmo);
|
||||
GtkScale *scale = GTK_SCALE (gtk_widget_get_parent (widget));
|
||||
@ -499,7 +495,7 @@ gtk_scale_allocate_marks (GtkGizmo *gizmo,
|
||||
for (m = priv->marks, i = 0; m; m = m->next, i++)
|
||||
{
|
||||
GtkScaleMark *mark = m->data;
|
||||
GtkAllocation mark_alloc, mark_clip;
|
||||
GtkAllocation mark_alloc;
|
||||
int mark_size;
|
||||
|
||||
if ((mark->position == GTK_POS_TOP && widget == priv->bottom_marks_widget) ||
|
||||
@ -531,8 +527,7 @@ gtk_scale_allocate_marks (GtkGizmo *gizmo,
|
||||
mark_alloc.y -= mark_size / 2;
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (mark->widget, &mark_alloc, baseline, &mark_clip);
|
||||
gdk_rectangle_union (out_clip, &mark_clip, out_clip);
|
||||
gtk_widget_size_allocate (mark->widget, &mark_alloc, baseline);
|
||||
}
|
||||
|
||||
g_free (marks);
|
||||
@ -541,15 +536,14 @@ gtk_scale_allocate_marks (GtkGizmo *gizmo,
|
||||
static void
|
||||
gtk_scale_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkScale *scale = GTK_SCALE (widget);
|
||||
GtkScalePrivate *priv = gtk_scale_get_instance_private (scale);
|
||||
GtkAllocation marks_clip, range_rect, marks_rect;
|
||||
GtkAllocation range_rect, marks_rect;
|
||||
GtkOrientation orientation;
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_scale_parent_class)->size_allocate (widget, allocation, baseline, out_clip);
|
||||
GTK_WIDGET_CLASS (gtk_scale_parent_class)->size_allocate (widget, allocation, baseline);
|
||||
|
||||
orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (widget));
|
||||
gtk_range_get_range_rect (GTK_RANGE (scale), &range_rect);
|
||||
@ -568,8 +562,7 @@ gtk_scale_size_allocate (GtkWidget *widget,
|
||||
marks_rect.y = 0;
|
||||
marks_rect.width = range_rect.width;
|
||||
marks_rect.height = marks_height;
|
||||
gtk_widget_size_allocate (priv->top_marks_widget, &marks_rect, -1, &marks_clip);
|
||||
gdk_rectangle_union (out_clip, &marks_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->top_marks_widget, &marks_rect, -1);
|
||||
}
|
||||
|
||||
if (priv->bottom_marks_widget)
|
||||
@ -582,8 +575,7 @@ gtk_scale_size_allocate (GtkWidget *widget,
|
||||
marks_rect.y = range_rect.y + range_rect.height;
|
||||
marks_rect.width = range_rect.width;
|
||||
marks_rect.height = marks_height;
|
||||
gtk_widget_size_allocate (priv->bottom_marks_widget, &marks_rect, -1, &marks_clip);
|
||||
gdk_rectangle_union (out_clip, &marks_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->bottom_marks_widget, &marks_rect, -1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -599,8 +591,7 @@ gtk_scale_size_allocate (GtkWidget *widget,
|
||||
marks_rect.x = 0;
|
||||
marks_rect.y = 0;
|
||||
marks_rect.width = marks_width;
|
||||
gtk_widget_size_allocate (priv->top_marks_widget, &marks_rect, -1, &marks_clip);
|
||||
gdk_rectangle_union (out_clip, &marks_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->top_marks_widget, &marks_rect, -1);
|
||||
}
|
||||
|
||||
if (priv->bottom_marks_widget)
|
||||
@ -614,17 +605,13 @@ gtk_scale_size_allocate (GtkWidget *widget,
|
||||
marks_rect.y = 0;
|
||||
marks_rect.width = marks_width;
|
||||
marks_rect.height = range_rect.height;
|
||||
gtk_widget_size_allocate (priv->bottom_marks_widget, &marks_rect, -1, &marks_clip);
|
||||
gdk_rectangle_union (out_clip, &marks_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->bottom_marks_widget, &marks_rect, -1);
|
||||
}
|
||||
}
|
||||
|
||||
if (priv->value_widget)
|
||||
{
|
||||
GtkAllocation value_clip;
|
||||
|
||||
gtk_scale_allocate_value (scale, &value_clip);
|
||||
gdk_rectangle_union (out_clip, &value_clip, out_clip);
|
||||
gtk_scale_allocate_value (scale);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,13 +122,12 @@ gtk_scrollbar_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_scrollbar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkScrollbar *self = GTK_SCROLLBAR (widget);
|
||||
GtkScrollbarPrivate *priv = gtk_scrollbar_get_instance_private (self);
|
||||
|
||||
gtk_widget_size_allocate (priv->box, allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (priv->box, allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -334,8 +334,7 @@ static void gtk_scrolled_window_snapshot (GtkWidget *widge
|
||||
GtkSnapshot *snapshot);
|
||||
static void gtk_scrolled_window_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static gboolean gtk_scrolled_window_focus (GtkWidget *widget,
|
||||
GtkDirectionType direction);
|
||||
static void gtk_scrolled_window_add (GtkContainer *container,
|
||||
@ -1390,8 +1389,7 @@ scroll_controller_decelerate (GtkEventControllerScroll *scroll,
|
||||
static void
|
||||
gtk_scrolled_window_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (widget);
|
||||
GtkScrolledWindowPrivate *priv = scrolled_window->priv;
|
||||
@ -1619,21 +1617,19 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
|
||||
gtk_widget_set_child_visible (priv->hscrollbar, priv->hscrollbar_visible);
|
||||
if (priv->hscrollbar_visible)
|
||||
{
|
||||
GtkAllocation clip;
|
||||
gtk_scrolled_window_allocate_scrollbar (scrolled_window,
|
||||
priv->hscrollbar,
|
||||
&child_allocation);
|
||||
gtk_widget_size_allocate (priv->hscrollbar, &child_allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (priv->hscrollbar, &child_allocation, -1);
|
||||
}
|
||||
|
||||
gtk_widget_set_child_visible (priv->vscrollbar, priv->vscrollbar_visible);
|
||||
if (priv->vscrollbar_visible)
|
||||
{
|
||||
GtkAllocation clip;
|
||||
gtk_scrolled_window_allocate_scrollbar (scrolled_window,
|
||||
priv->vscrollbar,
|
||||
&child_allocation);
|
||||
gtk_widget_size_allocate (priv->vscrollbar, &child_allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (priv->vscrollbar, &child_allocation, -1);
|
||||
}
|
||||
|
||||
gtk_scrolled_window_check_attach_pan_gesture (scrolled_window);
|
||||
@ -3048,7 +3044,6 @@ gtk_scrolled_window_allocate_child (GtkScrolledWindow *swindow,
|
||||
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (swindow);
|
||||
GtkWidget *widget = GTK_WIDGET (swindow), *child;
|
||||
GtkAllocation child_allocation;
|
||||
GtkAllocation child_clip;
|
||||
int sb_width;
|
||||
int sb_height;
|
||||
|
||||
@ -3090,7 +3085,7 @@ gtk_scrolled_window_allocate_child (GtkScrolledWindow *swindow,
|
||||
child_allocation.height = MAX (1, child_allocation.height - sb_height);
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1, &child_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -406,13 +406,12 @@ gtk_search_bar_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_search_bar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkSearchBar *bar = GTK_SEARCH_BAR (widget);
|
||||
GtkSearchBarPrivate *priv = gtk_search_bar_get_instance_private (bar);
|
||||
|
||||
gtk_widget_size_allocate (priv->revealer, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->revealer, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -519,12 +519,11 @@ gtk_shortcuts_shortcut_snapshot (GtkWidget *widget,
|
||||
static void
|
||||
gtk_shortcuts_shortcut_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GTK_WIDGET_CLASS (gtk_shortcuts_shortcut_parent_class)->size_allocate (widget, allocation, baseline, out_clip);
|
||||
GTK_WIDGET_CLASS (gtk_shortcuts_shortcut_parent_class)->size_allocate (widget, allocation, baseline);
|
||||
|
||||
gtk_widget_size_allocate (GTK_WIDGET (GTK_SHORTCUTS_SHORTCUT (widget)->box), allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (GTK_WIDGET (GTK_SHORTCUTS_SHORTCUT (widget)->box), allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -262,8 +262,7 @@ static void gtk_spin_button_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_spin_button_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static gboolean gtk_spin_button_event (GtkWidget *widget,
|
||||
GdkEvent *event);
|
||||
static void gtk_spin_button_grab_notify (GtkWidget *widget,
|
||||
@ -1082,12 +1081,11 @@ gtk_spin_button_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_spin_button_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkSpinButtonPrivate *priv = gtk_spin_button_get_instance_private (GTK_SPIN_BUTTON (widget));
|
||||
|
||||
gtk_widget_size_allocate (priv->box, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->box, allocation, baseline);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -170,8 +170,7 @@ static void gtk_stack_compute_expand (GtkWidget *widget,
|
||||
gboolean *vexpand);
|
||||
static void gtk_stack_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_stack_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
static void gtk_stack_measure (GtkWidget *widget,
|
||||
@ -2003,12 +2002,10 @@ gtk_stack_snapshot (GtkWidget *widget,
|
||||
static void
|
||||
gtk_stack_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkStack *stack = GTK_STACK (widget);
|
||||
GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
|
||||
GdkRectangle child_clip;
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
child_allocation.x = get_bin_window_x (stack);
|
||||
@ -2027,8 +2024,7 @@ gtk_stack_size_allocate (GtkWidget *widget,
|
||||
&min, &nat, NULL, NULL);
|
||||
child_allocation.height = MAX (min, allocation->height);
|
||||
|
||||
gtk_widget_size_allocate (priv->last_visible_child->widget, &child_allocation, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->last_visible_child->widget, &child_allocation, -1);
|
||||
|
||||
if (!gdk_rectangle_equal (&priv->last_visible_surface_allocation,
|
||||
&child_allocation))
|
||||
@ -2073,8 +2069,7 @@ gtk_stack_size_allocate (GtkWidget *widget,
|
||||
child_allocation.y = (allocation->height - child_allocation.height);
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (priv->visible_child->widget, &child_allocation, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->visible_child->widget, &child_allocation, -1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,12 +149,11 @@ gtk_statusbar_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_statusbar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkStatusbarPrivate *priv = gtk_statusbar_get_instance_private (GTK_STATUSBAR (widget));
|
||||
|
||||
gtk_widget_size_allocate (priv->frame, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (priv->frame, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -318,12 +318,10 @@ gtk_switch_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_switch_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkSwitch *self = GTK_SWITCH (widget);
|
||||
GtkSwitchPrivate *priv = gtk_switch_get_instance_private (self);
|
||||
GtkAllocation child_clip;
|
||||
GtkAllocation child_alloc;
|
||||
GtkAllocation slider_alloc;
|
||||
int min;
|
||||
@ -333,8 +331,7 @@ gtk_switch_size_allocate (GtkWidget *widget,
|
||||
slider_alloc.width = allocation->width / 2;
|
||||
slider_alloc.height = allocation->height;
|
||||
|
||||
gtk_widget_size_allocate (priv->slider, &slider_alloc, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->slider, &slider_alloc, -1);
|
||||
|
||||
|
||||
/* Center ON label in left half */
|
||||
@ -344,8 +341,7 @@ gtk_switch_size_allocate (GtkWidget *widget,
|
||||
gtk_widget_measure (priv->on_label, GTK_ORIENTATION_VERTICAL, min, &min, NULL, NULL, NULL);
|
||||
child_alloc.y = (allocation->height - min) / 2;
|
||||
child_alloc.height = min;
|
||||
gtk_widget_size_allocate (priv->on_label, &child_alloc, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->on_label, &child_alloc, -1);
|
||||
|
||||
/* Center OFF label in right half */
|
||||
gtk_widget_measure (priv->off_label, GTK_ORIENTATION_HORIZONTAL, -1, &min, NULL, NULL, NULL);
|
||||
@ -354,8 +350,7 @@ gtk_switch_size_allocate (GtkWidget *widget,
|
||||
gtk_widget_measure (priv->off_label, GTK_ORIENTATION_VERTICAL, min, &min, NULL, NULL, NULL);
|
||||
child_alloc.y = (allocation->height - min) / 2;
|
||||
child_alloc.height = min;
|
||||
gtk_widget_size_allocate (priv->off_label, &child_alloc, -1, &child_clip);
|
||||
gdk_rectangle_union (out_clip, &child_clip, out_clip);
|
||||
gtk_widget_size_allocate (priv->off_label, &child_alloc, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -370,8 +370,7 @@ static void gtk_text_view_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_text_view_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_text_view_realize (GtkWidget *widget);
|
||||
static void gtk_text_view_unrealize (GtkWidget *widget);
|
||||
static void gtk_text_view_map (GtkWidget *widget);
|
||||
@ -3959,11 +3958,10 @@ gtk_text_view_update_child_allocation (GtkTextView *text_view,
|
||||
GtkTextViewChild *vc)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
GtkAllocation clip;
|
||||
|
||||
gtk_text_view_compute_child_allocation (text_view, vc, &allocation);
|
||||
|
||||
gtk_widget_size_allocate (vc->widget, &allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (vc->widget, &allocation, -1);
|
||||
|
||||
#if 0
|
||||
g_print ("allocation for %p allocated to %d,%d yoffset = %d\n",
|
||||
@ -4045,7 +4043,6 @@ gtk_text_view_allocate_children (GtkTextView *text_view)
|
||||
else
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
GtkAllocation clip;
|
||||
GtkRequisition child_req;
|
||||
|
||||
allocation.x = child->x;
|
||||
@ -4065,7 +4062,7 @@ gtk_text_view_allocate_children (GtkTextView *text_view)
|
||||
allocation.width = child_req.width;
|
||||
allocation.height = child_req.height;
|
||||
|
||||
gtk_widget_size_allocate (child->widget, &allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (child->widget, &allocation, -1);
|
||||
}
|
||||
|
||||
tmp_list = tmp_list->next;
|
||||
@ -4075,8 +4072,7 @@ gtk_text_view_allocate_children (GtkTextView *text_view)
|
||||
static void
|
||||
gtk_text_view_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkTextView *text_view;
|
||||
GtkTextViewPrivate *priv;
|
||||
|
@ -194,8 +194,7 @@ static void gtk_toolbar_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
static void gtk_toolbar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_toolbar_style_updated (GtkWidget *widget);
|
||||
static gboolean gtk_toolbar_focus (GtkWidget *widget,
|
||||
GtkDirectionType dir);
|
||||
@ -1206,8 +1205,7 @@ rebuild_menu (GtkToolbar *toolbar)
|
||||
static void
|
||||
gtk_toolbar_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkToolbar *toolbar = GTK_TOOLBAR (widget);
|
||||
GtkToolbarPrivate *priv = toolbar->priv;
|
||||
@ -1512,7 +1510,7 @@ gtk_toolbar_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (need_arrow)
|
||||
{
|
||||
gtk_widget_size_allocate (GTK_WIDGET (priv->arrow_button), &arrow_allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (GTK_WIDGET (priv->arrow_button), &arrow_allocation, -1);
|
||||
gtk_widget_show (GTK_WIDGET (priv->arrow_button));
|
||||
}
|
||||
else
|
||||
@ -2955,10 +2953,8 @@ static void
|
||||
toolbar_content_size_allocate (ToolbarContent *content,
|
||||
GtkAllocation *allocation)
|
||||
{
|
||||
GtkAllocation clip;
|
||||
|
||||
content->allocation = *allocation;
|
||||
gtk_widget_size_allocate (GTK_WIDGET (content->item), allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (GTK_WIDGET (content->item), allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -598,8 +598,7 @@ static void gtk_tree_view_measure (GtkWidget *widget,
|
||||
int *natural_baseline);
|
||||
static void gtk_tree_view_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_tree_view_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
static gboolean gtk_tree_view_key_press (GtkWidget *widget,
|
||||
@ -2529,7 +2528,6 @@ gtk_tree_view_size_allocate_drag_column (GtkWidget *widget)
|
||||
{
|
||||
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
|
||||
GtkAllocation drag_allocation;
|
||||
GtkAllocation clip;
|
||||
GtkWidget *button;
|
||||
|
||||
if (tree_view->priv->drag_column == NULL)
|
||||
@ -2541,14 +2539,13 @@ gtk_tree_view_size_allocate_drag_column (GtkWidget *widget)
|
||||
drag_allocation.y = 0;
|
||||
drag_allocation.width = gdk_surface_get_width (tree_view->priv->drag_surface);
|
||||
drag_allocation.height = gdk_surface_get_height (tree_view->priv->drag_surface);
|
||||
gtk_widget_size_allocate (button, &drag_allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (button, &drag_allocation, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_tree_view_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
|
||||
GList *tmp_list;
|
||||
@ -2682,7 +2679,7 @@ gtk_tree_view_size_allocate (GtkWidget *widget,
|
||||
child_rect.y = MAX (min_y, MIN (max_y, child_rect.y));
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
gtk_widget_size_allocate (child->widget, &child_rect, -1, out_clip);
|
||||
gtk_widget_size_allocate (child->widget, &child_rect, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -9538,7 +9535,6 @@ _gtk_tree_view_column_start_drag (GtkTreeView *tree_view,
|
||||
GdkDevice *device)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
GtkAllocation clip;
|
||||
GtkAllocation button_allocation;
|
||||
GtkWidget *button;
|
||||
GtkStyleContext *context;
|
||||
@ -9575,7 +9571,7 @@ _gtk_tree_view_column_start_drag (GtkTreeView *tree_view,
|
||||
tree_view->priv->drag_column_x = button_allocation.x;
|
||||
allocation = button_allocation;
|
||||
allocation.x = 0;
|
||||
gtk_widget_size_allocate (button, &allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (button, &allocation, -1);
|
||||
|
||||
tree_view->priv->drag_column = column;
|
||||
gdk_surface_show (tree_view->priv->drag_surface);
|
||||
|
@ -2012,7 +2012,6 @@ _gtk_tree_view_column_allocate (GtkTreeViewColumn *tree_column,
|
||||
{
|
||||
GtkTreeViewColumnPrivate *priv;
|
||||
GtkAllocation allocation = { 0, 0, 0, 0 };
|
||||
GtkAllocation clip;
|
||||
|
||||
g_return_if_fail (GTK_IS_TREE_VIEW_COLUMN (tree_column));
|
||||
|
||||
@ -2036,7 +2035,7 @@ _gtk_tree_view_column_allocate (GtkTreeViewColumn *tree_column,
|
||||
allocation.width = width;
|
||||
allocation.height = height;
|
||||
|
||||
gtk_widget_size_allocate (priv->button, &allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (priv->button, &allocation, -1);
|
||||
}
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (tree_column), tree_column_props[PROP_X_OFFSET]);
|
||||
|
@ -87,12 +87,11 @@ gtk_video_measure (GtkWidget *widget,
|
||||
static void
|
||||
gtk_video_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkVideo *self = GTK_VIDEO (widget);
|
||||
|
||||
gtk_widget_size_allocate (self->box, allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (self->box, allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -98,8 +98,7 @@ static void gtk_viewport_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot);
|
||||
static void gtk_viewport_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment,
|
||||
gpointer data);
|
||||
static void viewport_set_adjustment (GtkViewport *viewport,
|
||||
@ -525,8 +524,7 @@ gtk_viewport_snapshot (GtkWidget *widget,
|
||||
static void
|
||||
gtk_viewport_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkViewport *viewport = GTK_VIEWPORT (widget);
|
||||
GtkViewportPrivate *priv = gtk_viewport_get_instance_private (viewport);
|
||||
@ -543,7 +541,7 @@ gtk_viewport_size_allocate (GtkWidget *widget,
|
||||
child = gtk_bin_get_child (GTK_BIN (widget));
|
||||
if (child && gtk_widget_get_visible (child))
|
||||
{
|
||||
GtkAllocation child_allocation, child_clip;
|
||||
GtkAllocation child_allocation;
|
||||
|
||||
child_allocation.x = - gtk_adjustment_get_value (hadjustment);
|
||||
child_allocation.y = - gtk_adjustment_get_value (vadjustment);
|
||||
@ -551,7 +549,7 @@ gtk_viewport_size_allocate (GtkWidget *widget,
|
||||
child_allocation.height = gtk_adjustment_get_upper (vadjustment);
|
||||
|
||||
/* Explicitly ignore the child clip here. */
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1, &child_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1);
|
||||
}
|
||||
|
||||
g_object_thaw_notify (G_OBJECT (hadjustment));
|
||||
|
@ -586,8 +586,7 @@ static void gtk_widget_real_realize (GtkWidget *widget);
|
||||
static void gtk_widget_real_unrealize (GtkWidget *widget);
|
||||
static void gtk_widget_real_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static void gtk_widget_real_direction_changed(GtkWidget *widget,
|
||||
GtkTextDirection previous_direction);
|
||||
|
||||
@ -1528,7 +1527,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
* @allocation: (type Gtk.Allocation): the region which has been
|
||||
* allocated to the widget.
|
||||
* @baseline: the baseline
|
||||
* @out_clip: (out) (type Gtk.Allocation): Return address for the widget's clip
|
||||
*/
|
||||
widget_signals[SIZE_ALLOCATE] =
|
||||
g_signal_new (I_("size-allocate"),
|
||||
@ -1537,10 +1535,9 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
G_STRUCT_OFFSET (GtkWidgetClass, size_allocate),
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
G_TYPE_NONE, 3,
|
||||
G_TYPE_NONE, 2,
|
||||
GDK_TYPE_RECTANGLE | G_SIGNAL_TYPE_STATIC_SCOPE,
|
||||
G_TYPE_INT,
|
||||
GDK_TYPE_RECTANGLE | G_SIGNAL_TYPE_STATIC_SCOPE);
|
||||
G_TYPE_INT);
|
||||
|
||||
/**
|
||||
* GtkWidget::state-flags-changed:
|
||||
@ -4242,8 +4239,6 @@ get_box_padding (GtkCssStyle *style,
|
||||
* @widget: a #GtkWidget
|
||||
* @allocation: position and size to be allocated to @widget
|
||||
* @baseline: The baseline of the child, or -1
|
||||
* @out_clip: (out): Return location for @widget's clip region. The returned clip
|
||||
* will be in the coordinate system of @widget's parent, just like @allocation.
|
||||
*
|
||||
* This function is only used by #GtkWidget subclasses, to assign a size,
|
||||
* position and (optionally) baseline to their child widgets.
|
||||
@ -4255,8 +4250,7 @@ get_box_padding (GtkCssStyle *style,
|
||||
void
|
||||
gtk_widget_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
|
||||
GdkRectangle real_allocation;
|
||||
@ -4269,21 +4263,16 @@ gtk_widget_size_allocate (GtkWidget *widget,
|
||||
gint min_width, min_height;
|
||||
GtkCssStyle *style;
|
||||
GtkBorder margin, border, padding;
|
||||
GtkAllocation new_clip;
|
||||
GdkDisplay *display;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (baseline >= -1);
|
||||
g_return_if_fail (out_clip != NULL);
|
||||
g_return_if_fail (allocation != NULL);
|
||||
|
||||
gtk_widget_push_verify_invariants (widget);
|
||||
|
||||
if (!priv->visible && !_gtk_widget_is_toplevel (widget))
|
||||
{
|
||||
memset (out_clip, 0, sizeof (GdkRectangle));
|
||||
goto out;
|
||||
}
|
||||
goto out;
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
display = gtk_widget_get_display (widget);
|
||||
@ -4460,18 +4449,15 @@ gtk_widget_size_allocate (GtkWidget *widget,
|
||||
margin.right + border.right + padding.right;
|
||||
real_allocation.height -= margin.top + border.top + padding.top +
|
||||
margin.bottom + border.bottom + padding.bottom;
|
||||
new_clip = real_allocation;
|
||||
|
||||
if (g_signal_has_handler_pending (widget, widget_signals[SIZE_ALLOCATE], 0, FALSE))
|
||||
g_signal_emit (widget, widget_signals[SIZE_ALLOCATE], 0,
|
||||
&real_allocation,
|
||||
baseline,
|
||||
&new_clip);
|
||||
baseline);
|
||||
else
|
||||
GTK_WIDGET_GET_CLASS (widget)->size_allocate (widget,
|
||||
&real_allocation,
|
||||
baseline,
|
||||
&new_clip);
|
||||
baseline);
|
||||
|
||||
/* Size allocation is god... after consulting god, no further requests or allocations are needed */
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
@ -4724,8 +4710,7 @@ gtk_widget_translate_coordinatesf (GtkWidget *src_widget,
|
||||
static void
|
||||
gtk_widget_real_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
|
||||
|
||||
@ -12249,11 +12234,10 @@ gtk_widget_ensure_allocate (GtkWidget *widget)
|
||||
if (priv->alloc_needed)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
GtkAllocation clip;
|
||||
int baseline;
|
||||
|
||||
gtk_widget_get_allocated_size (widget, &allocation, &baseline);
|
||||
gtk_widget_size_allocate (widget, &allocation, baseline, &clip);
|
||||
gtk_widget_size_allocate (widget, &allocation, baseline);
|
||||
}
|
||||
else if (priv->alloc_needed_on_child)
|
||||
{
|
||||
|
@ -257,8 +257,7 @@ struct _GtkWidgetClass
|
||||
void (* unrealize) (GtkWidget *widget);
|
||||
void (* size_allocate) (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
void (* state_flags_changed) (GtkWidget *widget,
|
||||
GtkStateFlags previous_state_flags);
|
||||
void (* hierarchy_changed) (GtkWidget *widget,
|
||||
@ -427,8 +426,7 @@ GdkFrameClock* gtk_widget_get_frame_clock (GtkWidget *widget);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_widget_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GtkSizeRequestMode gtk_widget_get_request_mode (GtkWidget *widget);
|
||||
|
@ -424,8 +424,7 @@ static void gtk_window_realize (GtkWidget *widget);
|
||||
static void gtk_window_unrealize (GtkWidget *widget);
|
||||
static void gtk_window_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip);
|
||||
int baseline);
|
||||
static gboolean gtk_window_close_request (GtkWindow *window);
|
||||
static gboolean gtk_window_emit_close_request (GtkWindow *window);
|
||||
static gboolean gtk_window_configure_event (GtkWidget *widget,
|
||||
@ -5427,8 +5426,7 @@ gtk_window_resize (GtkWindow *window,
|
||||
* static void
|
||||
* on_size_allocate (GtkWidget *widget,
|
||||
* const GtkAllocation *allocation,
|
||||
* int baseline,
|
||||
* GtkAllocation *out_clip)
|
||||
* int baseline)
|
||||
* {
|
||||
* int new_width, new_height;
|
||||
*
|
||||
@ -6811,7 +6809,6 @@ gtk_window_realize (GtkWidget *widget)
|
||||
allocation.height == 1)
|
||||
{
|
||||
GdkRectangle request;
|
||||
GdkRectangle clip;
|
||||
|
||||
gtk_window_compute_configure_request (window, &request, NULL, NULL);
|
||||
|
||||
@ -6819,7 +6816,7 @@ gtk_window_realize (GtkWidget *widget)
|
||||
allocation.y = 0;
|
||||
allocation.width = request.width;
|
||||
allocation.height = request.height;
|
||||
gtk_widget_size_allocate (widget, &allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (widget, &allocation, -1);
|
||||
|
||||
gtk_widget_queue_resize (widget);
|
||||
|
||||
@ -7070,13 +7067,12 @@ popover_size_allocate (GtkWindowPopover *popover,
|
||||
GtkWindow *window)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
GtkAllocation clip;
|
||||
|
||||
if (GTK_IS_POPOVER (popover->widget))
|
||||
gtk_popover_update_position (GTK_POPOVER (popover->widget));
|
||||
|
||||
popover_get_rect (popover, window, &rect);
|
||||
gtk_widget_size_allocate (popover->widget, &rect, -1, &clip);
|
||||
gtk_widget_size_allocate (popover->widget, &rect, -1);
|
||||
}
|
||||
|
||||
/* _gtk_window_set_allocation:
|
||||
@ -7131,7 +7127,6 @@ _gtk_window_set_allocation (GtkWindow *window,
|
||||
!priv->fullscreen)
|
||||
{
|
||||
GtkAllocation title_allocation;
|
||||
GtkAllocation title_clip;
|
||||
|
||||
title_allocation.x = window_border.left;
|
||||
title_allocation.y = window_border.top;
|
||||
@ -7146,7 +7141,7 @@ _gtk_window_set_allocation (GtkWindow *window,
|
||||
|
||||
title_allocation.height = priv->title_height;
|
||||
|
||||
gtk_widget_size_allocate (priv->title_box, &title_allocation, -1, &title_clip);
|
||||
gtk_widget_size_allocate (priv->title_box, &title_allocation, -1);
|
||||
}
|
||||
|
||||
if (priv->decorated &&
|
||||
@ -7179,8 +7174,7 @@ _gtk_window_set_allocation (GtkWindow *window,
|
||||
static void
|
||||
gtk_window_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkWindow *window = GTK_WINDOW (widget);
|
||||
GtkWidget *child;
|
||||
@ -7190,7 +7184,7 @@ gtk_window_size_allocate (GtkWidget *widget,
|
||||
|
||||
child = gtk_bin_get_child (GTK_BIN (window));
|
||||
if (child && gtk_widget_get_visible (child))
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1, out_clip);
|
||||
gtk_widget_size_allocate (child, &child_allocation, -1);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -8862,7 +8856,6 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
if (priv->configure_notify_received)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
GtkAllocation clip;
|
||||
int min;
|
||||
|
||||
/* If we have received a configure event since
|
||||
@ -8888,7 +8881,7 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
&min, NULL, NULL, NULL);
|
||||
allocation.height = MAX (min, current_height);
|
||||
|
||||
gtk_widget_size_allocate (widget, &allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (widget, &allocation, -1);
|
||||
|
||||
/* If the configure request changed, it means that
|
||||
* we either:
|
||||
@ -8964,7 +8957,6 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
if (priv->type == GTK_WINDOW_POPUP)
|
||||
{
|
||||
GtkAllocation allocation;
|
||||
GtkAllocation clip;
|
||||
|
||||
/* Directly size allocate for override redirect (popup) windows. */
|
||||
allocation.x = 0;
|
||||
@ -8972,7 +8964,7 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
allocation.width = new_request.width;
|
||||
allocation.height = new_request.height;
|
||||
|
||||
gtk_widget_size_allocate (widget, &allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (widget, &allocation, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -9000,7 +8992,7 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
}
|
||||
else
|
||||
{
|
||||
GtkAllocation allocation, clip;
|
||||
GtkAllocation allocation;
|
||||
int min_width, min_height;
|
||||
|
||||
/* Handle any position changes.
|
||||
@ -9024,7 +9016,7 @@ gtk_window_move_resize (GtkWindow *window)
|
||||
allocation.width = MAX (current_width, min_width);
|
||||
allocation.height = MAX (current_height, min_height);
|
||||
|
||||
gtk_widget_size_allocate (widget, &allocation, -1, &clip);
|
||||
gtk_widget_size_allocate (widget, &allocation, -1);
|
||||
}
|
||||
|
||||
/* We have now processed a move/resize since the last position
|
||||
|
@ -251,11 +251,10 @@ gtk_stack_combo_snapshot (GtkWidget *widget,
|
||||
static void
|
||||
gtk_stack_combo_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkStackCombo *self = GTK_STACK_COMBO (widget);
|
||||
gtk_widget_size_allocate (GTK_WIDGET (self->combo), allocation, baseline, out_clip);
|
||||
gtk_widget_size_allocate (GTK_WIDGET (self->combo), allocation, baseline);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -136,7 +136,6 @@ static void
|
||||
allocation_changed (GtkWidget *w,
|
||||
GdkRectangle *allocation,
|
||||
int baseline,
|
||||
GdkRectangle *out_clip,
|
||||
GtkInspectorMiscInfo *sl)
|
||||
{
|
||||
GtkAllocation alloc;
|
||||
@ -459,7 +458,7 @@ gtk_inspector_misc_info_set_object (GtkInspectorMiscInfo *sl,
|
||||
state_flags_changed (GTK_WIDGET (sl->priv->object), 0, sl);
|
||||
|
||||
g_signal_connect_object (object, "size-allocate", G_CALLBACK (allocation_changed), sl, 0);
|
||||
allocation_changed (GTK_WIDGET (sl->priv->object), NULL, -1, NULL, sl);
|
||||
allocation_changed (GTK_WIDGET (sl->priv->object), NULL, -1, sl);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -36,7 +36,6 @@ static void
|
||||
size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GdkRectangle *clip,
|
||||
gpointer data)
|
||||
{
|
||||
if (surface)
|
||||
|
@ -1,9 +1,10 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
child_size_allocate (GtkWidget *child,
|
||||
child_size_allocate (GtkWidget *child,
|
||||
GdkRectangle *allocation,
|
||||
gpointer user_data)
|
||||
gint baseline,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
context = gtk_widget_get_style_context (child);
|
||||
|
@ -90,8 +90,7 @@ G_DEFINE_TYPE(GtkFocusWidget, gtk_focus_widget, GTK_TYPE_WIDGET)
|
||||
static void
|
||||
gtk_focus_widget_size_allocate (GtkWidget *widget,
|
||||
const GtkAllocation *allocation,
|
||||
int baseline,
|
||||
GtkAllocation *out_clip)
|
||||
int baseline)
|
||||
{
|
||||
GtkFocusWidget *self = GTK_FOCUS_WIDGET (widget);
|
||||
int child_width = (allocation->width) / 2;
|
||||
@ -103,19 +102,19 @@ gtk_focus_widget_size_allocate (GtkWidget *widget,
|
||||
child_alloc.width = child_width;
|
||||
child_alloc.height = child_height;
|
||||
|
||||
gtk_widget_size_allocate (self->child1, &child_alloc, -1, out_clip);
|
||||
gtk_widget_size_allocate (self->child1, &child_alloc, -1);
|
||||
|
||||
child_alloc.x += child_width;
|
||||
|
||||
gtk_widget_size_allocate (self->child2, &child_alloc, -1, out_clip);
|
||||
gtk_widget_size_allocate (self->child2, &child_alloc, -1);
|
||||
|
||||
child_alloc.y += child_height;
|
||||
|
||||
gtk_widget_size_allocate (self->child4, &child_alloc, -1, out_clip);
|
||||
gtk_widget_size_allocate (self->child4, &child_alloc, -1);
|
||||
|
||||
child_alloc.x -= child_width;
|
||||
|
||||
gtk_widget_size_allocate (self->child3, &child_alloc, -1, out_clip);
|
||||
gtk_widget_size_allocate (self->child3, &child_alloc, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user