mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c gtk/gtkframe.c
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c gtk/gtktreeeitem.c gtk/gtkviewport.c Fix up comparisons of signed and unsigned ints to avoid assigning negative widths/heigths.
This commit is contained in:
parent
c8ae0b92ca
commit
467e0fcb24
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
|
||||
gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
|
||||
gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
|
||||
gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
|
||||
gtk/gtktreeeitem.c gtk/gtkviewport.c
|
||||
|
||||
Fix up comparisons of signed and unsigned ints to avoid
|
||||
assigning negative widths/heigths.
|
||||
|
||||
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* acinclude.m4 (ac_result): Unset CATOBJEXT so
|
||||
|
@ -1,3 +1,14 @@
|
||||
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
|
||||
gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
|
||||
gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
|
||||
gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
|
||||
gtk/gtktreeeitem.c gtk/gtkviewport.c
|
||||
|
||||
Fix up comparisons of signed and unsigned ints to avoid
|
||||
assigning negative widths/heigths.
|
||||
|
||||
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* acinclude.m4 (ac_result): Unset CATOBJEXT so
|
||||
|
@ -1,3 +1,14 @@
|
||||
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
|
||||
gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
|
||||
gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
|
||||
gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
|
||||
gtk/gtktreeeitem.c gtk/gtkviewport.c
|
||||
|
||||
Fix up comparisons of signed and unsigned ints to avoid
|
||||
assigning negative widths/heigths.
|
||||
|
||||
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* acinclude.m4 (ac_result): Unset CATOBJEXT so
|
||||
|
@ -1,3 +1,14 @@
|
||||
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
|
||||
gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
|
||||
gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
|
||||
gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
|
||||
gtk/gtktreeeitem.c gtk/gtkviewport.c
|
||||
|
||||
Fix up comparisons of signed and unsigned ints to avoid
|
||||
assigning negative widths/heigths.
|
||||
|
||||
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* acinclude.m4 (ac_result): Unset CATOBJEXT so
|
||||
|
@ -1,3 +1,14 @@
|
||||
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
|
||||
gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
|
||||
gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
|
||||
gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
|
||||
gtk/gtktreeeitem.c gtk/gtkviewport.c
|
||||
|
||||
Fix up comparisons of signed and unsigned ints to avoid
|
||||
assigning negative widths/heigths.
|
||||
|
||||
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* acinclude.m4 (ac_result): Unset CATOBJEXT so
|
||||
|
@ -1,3 +1,14 @@
|
||||
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
|
||||
gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
|
||||
gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
|
||||
gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
|
||||
gtk/gtktreeeitem.c gtk/gtkviewport.c
|
||||
|
||||
Fix up comparisons of signed and unsigned ints to avoid
|
||||
assigning negative widths/heigths.
|
||||
|
||||
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* acinclude.m4 (ac_result): Unset CATOBJEXT so
|
||||
|
@ -1,3 +1,14 @@
|
||||
Wed Jan 13 22:34:29 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkhandlebox.c
|
||||
gtk/gtkframe.c gtk/gtk[hv]box.c gtk[hv]paned.c gtk/gtklist.c
|
||||
gtkmenu.c gtkmenuitem.c gtkmenubar.c gtknotebook.c
|
||||
gtk/gtkscrolledwindow.c gtk/gtktable.c gtk/gtktree.c
|
||||
gtk/gtktreeeitem.c gtk/gtkviewport.c
|
||||
|
||||
Fix up comparisons of signed and unsigned ints to avoid
|
||||
assigning negative widths/heigths.
|
||||
|
||||
Wed Jan 13 21:18:41 1999 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* acinclude.m4 (ac_result): Unset CATOBJEXT so
|
||||
|
@ -471,9 +471,9 @@ gtk_button_size_allocate (GtkWidget *widget,
|
||||
child_allocation.x = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->xthickness);
|
||||
child_allocation.y = (CHILD_SPACING + GTK_WIDGET (widget)->style->klass->ythickness);
|
||||
|
||||
child_allocation.width = MAX (1, widget->allocation.width - child_allocation.x * 2 -
|
||||
child_allocation.width = MAX (1, (gint)widget->allocation.width - child_allocation.x * 2 -
|
||||
border_width * 2);
|
||||
child_allocation.height = MAX (1, widget->allocation.height - child_allocation.y * 2 -
|
||||
child_allocation.height = MAX (1, (gint)widget->allocation.height - child_allocation.y * 2 -
|
||||
border_width * 2);
|
||||
|
||||
if (GTK_WIDGET_CAN_DEFAULT (button))
|
||||
@ -482,10 +482,10 @@ gtk_button_size_allocate (GtkWidget *widget,
|
||||
DEFAULT_LEFT_POS);
|
||||
child_allocation.y += (GTK_WIDGET (widget)->style->klass->ythickness +
|
||||
DEFAULT_TOP_POS);
|
||||
child_allocation.width = MAX (1, child_allocation.width -
|
||||
(GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
|
||||
child_allocation.height = MAX (1, child_allocation.height -
|
||||
(GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
|
||||
child_allocation.width = MAX (1, (gint)child_allocation.width -
|
||||
(gint)(GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
|
||||
child_allocation.height = MAX (1, (gint)child_allocation.height -
|
||||
(gint)(GTK_WIDGET (widget)->style->klass->xthickness * 2 + DEFAULT_SPACING));
|
||||
}
|
||||
|
||||
gtk_widget_size_allocate (GTK_BIN (button)->child, &child_allocation);
|
||||
|
@ -5367,9 +5367,9 @@ gtk_clist_size_allocate (GtkWidget *widget,
|
||||
* border width */
|
||||
clist->internal_allocation.x = 0;
|
||||
clist->internal_allocation.y = 0;
|
||||
clist->internal_allocation.width = MAX (1, allocation->width -
|
||||
clist->internal_allocation.width = MAX (1, (gint)allocation->width -
|
||||
border_width * 2);
|
||||
clist->internal_allocation.height = MAX (1, allocation->height -
|
||||
clist->internal_allocation.height = MAX (1, (gint)allocation->height -
|
||||
border_width * 2);
|
||||
|
||||
/* allocate clist window assuming no scrollbars */
|
||||
@ -5378,11 +5378,11 @@ gtk_clist_size_allocate (GtkWidget *widget,
|
||||
clist_allocation.y = (clist->internal_allocation.y +
|
||||
widget->style->klass->ythickness +
|
||||
clist->column_title_area.height);
|
||||
clist_allocation.width = MAX (1, clist->internal_allocation.width -
|
||||
(2 * widget->style->klass->xthickness));
|
||||
clist_allocation.height = MAX (1, clist->internal_allocation.height -
|
||||
(2 * widget->style->klass->ythickness) -
|
||||
clist->column_title_area.height);
|
||||
clist_allocation.width = MAX (1, (gint)clist->internal_allocation.width -
|
||||
(2 * (gint)widget->style->klass->xthickness));
|
||||
clist_allocation.height = MAX (1, (gint)clist->internal_allocation.height -
|
||||
(2 * (gint)widget->style->klass->ythickness) -
|
||||
(gint)clist->column_title_area.height);
|
||||
|
||||
clist->clist_window_width = clist_allocation.width;
|
||||
clist->clist_window_height = clist_allocation.height;
|
||||
|
@ -497,13 +497,13 @@ gtk_frame_size_allocate (GtkWidget *widget,
|
||||
{
|
||||
child_allocation.x = (GTK_CONTAINER (frame)->border_width +
|
||||
GTK_WIDGET (frame)->style->klass->xthickness);
|
||||
child_allocation.width = MAX(0, allocation->width - child_allocation.x * 2);
|
||||
child_allocation.width = MAX(1, (gint)allocation->width - child_allocation.x * 2);
|
||||
|
||||
child_allocation.y = (GTK_CONTAINER (frame)->border_width +
|
||||
MAX (frame->label_height, GTK_WIDGET (frame)->style->klass->ythickness));
|
||||
child_allocation.height = MAX (1, (allocation->height - child_allocation.y -
|
||||
GTK_CONTAINER (frame)->border_width -
|
||||
GTK_WIDGET (frame)->style->klass->ythickness));
|
||||
child_allocation.height = MAX (1, ((gint)allocation->height - child_allocation.y -
|
||||
(gint)GTK_CONTAINER (frame)->border_width -
|
||||
(gint)GTK_WIDGET (frame)->style->klass->ythickness));
|
||||
|
||||
child_allocation.x += allocation->x;
|
||||
child_allocation.y += allocation->y;
|
||||
|
@ -575,8 +575,8 @@ gtk_handle_box_size_allocate (GtkWidget *widget,
|
||||
}
|
||||
else
|
||||
{
|
||||
child_allocation.width = MAX (1, widget->allocation.width - 2 * border_width);
|
||||
child_allocation.height = MAX (1, widget->allocation.height - 2 * border_width);
|
||||
child_allocation.width = MAX (1, (gint)widget->allocation.width - 2 * border_width);
|
||||
child_allocation.height = MAX (1, (gint)widget->allocation.height - 2 * border_width);
|
||||
|
||||
if (hb->handle_position == GTK_POS_LEFT ||
|
||||
hb->handle_position == GTK_POS_RIGHT)
|
||||
|
@ -200,7 +200,7 @@ gtk_hbox_size_allocate (GtkWidget *widget,
|
||||
|
||||
x = allocation->x + GTK_CONTAINER (box)->border_width;
|
||||
child_allocation.y = allocation->y + GTK_CONTAINER (box)->border_width;
|
||||
child_allocation.height = MAX (1, allocation->height - GTK_CONTAINER (box)->border_width * 2);
|
||||
child_allocation.height = MAX (1, (gint)allocation->height - (gint)GTK_CONTAINER (box)->border_width * 2);
|
||||
|
||||
children = box->children;
|
||||
while (children)
|
||||
@ -238,7 +238,7 @@ gtk_hbox_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (child->fill)
|
||||
{
|
||||
child_allocation.width = MAX (1, child_width - child->padding * 2);
|
||||
child_allocation.width = MAX (1, (gint)child_width - (gint)child->padding * 2);
|
||||
child_allocation.x = x + child->padding;
|
||||
}
|
||||
else
|
||||
@ -291,7 +291,7 @@ gtk_hbox_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (child->fill)
|
||||
{
|
||||
child_allocation.width = MAX (1, child_width - child->padding * 2);
|
||||
child_allocation.width = MAX (1, (gint)child_width - (gint)child->padding * 2);
|
||||
child_allocation.x = x + child->padding - child_width;
|
||||
}
|
||||
else
|
||||
|
@ -174,7 +174,7 @@ gtk_hpaned_size_allocate (GtkWidget *widget,
|
||||
paned->groove_rectangle.height);
|
||||
}
|
||||
|
||||
child1_allocation.height = child2_allocation.height = MAX (1, allocation->height - border_width * 2);
|
||||
child1_allocation.height = child2_allocation.height = MAX (1, (gint)allocation->height - border_width * 2);
|
||||
child1_allocation.width = paned->child1_size;
|
||||
child1_allocation.x = border_width;
|
||||
child1_allocation.y = child2_allocation.y = border_width;
|
||||
@ -186,7 +186,7 @@ gtk_hpaned_size_allocate (GtkWidget *widget,
|
||||
paned->groove_rectangle.height = allocation->height;
|
||||
|
||||
child2_allocation.x = paned->groove_rectangle.x + paned->gutter_size / 2 + 1;
|
||||
child2_allocation.width = MAX (1, allocation->width
|
||||
child2_allocation.width = MAX (1, (gint)allocation->width
|
||||
- child2_allocation.x - border_width);
|
||||
|
||||
/* Now allocate the childen, making sure, when resizing not to
|
||||
|
@ -368,7 +368,7 @@ gtk_list_size_allocate (GtkWidget *widget,
|
||||
{
|
||||
child_allocation.x = GTK_CONTAINER (list)->border_width;
|
||||
child_allocation.y = GTK_CONTAINER (list)->border_width;
|
||||
child_allocation.width = MAX (1, allocation->width -
|
||||
child_allocation.width = MAX (1, (gint)allocation->width -
|
||||
child_allocation.x * 2);
|
||||
|
||||
children = list->children;
|
||||
|
@ -766,7 +766,7 @@ gtk_menu_size_allocate (GtkWidget *widget,
|
||||
widget->style->klass->xthickness);
|
||||
child_allocation.y = (GTK_CONTAINER (menu)->border_width +
|
||||
widget->style->klass->ythickness);
|
||||
child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
|
||||
child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
|
||||
|
||||
children = menu_shell->children;
|
||||
while (children)
|
||||
|
@ -293,7 +293,7 @@ gtk_menu_bar_size_allocate (GtkWidget *widget,
|
||||
child_allocation.y = (GTK_CONTAINER (menu_bar)->border_width +
|
||||
widget->style->klass->ythickness +
|
||||
BORDER_SPACING);
|
||||
child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
|
||||
child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
|
||||
|
||||
children = menu_shell->children;
|
||||
while (children)
|
||||
|
@ -386,8 +386,8 @@ gtk_menu_item_size_allocate (GtkWidget *widget,
|
||||
BORDER_SPACING);
|
||||
child_allocation.y = (GTK_CONTAINER (widget)->border_width +
|
||||
widget->style->klass->ythickness);
|
||||
child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
|
||||
child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
|
||||
child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
|
||||
child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
|
||||
child_allocation.x += GTK_MENU_ITEM (widget)->toggle_size;
|
||||
child_allocation.width -= GTK_MENU_ITEM (widget)->toggle_size;
|
||||
if (menu_item->submenu && menu_item->show_submenu_indicator)
|
||||
|
@ -823,17 +823,17 @@ gtk_notebook_size_allocate (GtkWidget *widget,
|
||||
{
|
||||
child_allocation.x = GTK_CONTAINER (widget)->border_width;
|
||||
child_allocation.y = GTK_CONTAINER (widget)->border_width;
|
||||
child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
|
||||
child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
|
||||
child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
|
||||
child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
|
||||
|
||||
if (notebook->show_tabs || notebook->show_border)
|
||||
{
|
||||
child_allocation.x += widget->style->klass->xthickness;
|
||||
child_allocation.y += widget->style->klass->ythickness;
|
||||
child_allocation.width = MAX (1, child_allocation.width -
|
||||
widget->style->klass->xthickness * 2);
|
||||
child_allocation.height = MAX (1, child_allocation.height -
|
||||
widget->style->klass->ythickness * 2);
|
||||
child_allocation.width = MAX (1, (gint)child_allocation.width -
|
||||
(gint) widget->style->klass->xthickness * 2);
|
||||
child_allocation.height = MAX (1, (gint)child_allocation.height -
|
||||
(gint) widget->style->klass->ythickness * 2);
|
||||
|
||||
if (notebook->show_tabs && notebook->children && notebook->cur_page)
|
||||
{
|
||||
@ -843,15 +843,15 @@ gtk_notebook_size_allocate (GtkWidget *widget,
|
||||
child_allocation.y += notebook->cur_page->requisition.height;
|
||||
case GTK_POS_BOTTOM:
|
||||
child_allocation.height =
|
||||
MAX (1, child_allocation.height -
|
||||
notebook->cur_page->requisition.height);
|
||||
MAX (1, (gint)child_allocation.height -
|
||||
(gint)notebook->cur_page->requisition.height);
|
||||
break;
|
||||
case GTK_POS_LEFT:
|
||||
child_allocation.x += notebook->cur_page->requisition.width;
|
||||
case GTK_POS_RIGHT:
|
||||
child_allocation.width =
|
||||
MAX (1, child_allocation.width -
|
||||
notebook->cur_page->requisition.width);
|
||||
MAX (1, (gint)child_allocation.width -
|
||||
(gint)notebook->cur_page->requisition.width);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -676,8 +676,8 @@ gtk_scrolled_window_relative_allocation (GtkWidget *widget,
|
||||
|
||||
allocation->x = GTK_CONTAINER (widget)->border_width;
|
||||
allocation->y = GTK_CONTAINER (widget)->border_width;
|
||||
allocation->width = MAX (1, widget->allocation.width - allocation->x * 2);
|
||||
allocation->height = MAX (1, widget->allocation.height - allocation->y * 2);
|
||||
allocation->width = MAX (1, (gint)widget->allocation.width - allocation->x * 2);
|
||||
allocation->height = MAX (1, (gint)widget->allocation.height - allocation->y * 2);
|
||||
|
||||
if (scrolled_window->vscrollbar_visible)
|
||||
{
|
||||
@ -686,9 +686,9 @@ gtk_scrolled_window_relative_allocation (GtkWidget *widget,
|
||||
allocation->x += (scrolled_window->vscrollbar->requisition.width +
|
||||
SCROLLBAR_SPACING (scrolled_window));
|
||||
|
||||
allocation->width = MAX (1, allocation->width -
|
||||
(scrolled_window->vscrollbar->requisition.width +
|
||||
SCROLLBAR_SPACING (scrolled_window)));
|
||||
allocation->width = MAX (1, (gint)allocation->width -
|
||||
((gint)scrolled_window->vscrollbar->requisition.width +
|
||||
(gint)SCROLLBAR_SPACING (scrolled_window)));
|
||||
}
|
||||
if (scrolled_window->hscrollbar_visible)
|
||||
{
|
||||
@ -697,9 +697,9 @@ gtk_scrolled_window_relative_allocation (GtkWidget *widget,
|
||||
allocation->y += (scrolled_window->hscrollbar->requisition.height +
|
||||
SCROLLBAR_SPACING (scrolled_window));
|
||||
|
||||
allocation->height = MAX (1, allocation->height -
|
||||
(scrolled_window->hscrollbar->requisition.height +
|
||||
SCROLLBAR_SPACING (scrolled_window)));
|
||||
allocation->height = MAX (1, (gint)allocation->height -
|
||||
((gint)scrolled_window->hscrollbar->requisition.height +
|
||||
(gint)SCROLLBAR_SPACING (scrolled_window)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1348,7 +1348,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
|
||||
if (table->cols[col].shrink)
|
||||
{
|
||||
extra = width / nshrink;
|
||||
table->cols[col].allocation = MAX (1, table->cols[col].allocation - extra);
|
||||
table->cols[col].allocation = MAX (1, (gint)table->cols[col].allocation - extra);
|
||||
|
||||
width -= extra;
|
||||
nshrink -= 1;
|
||||
@ -1426,7 +1426,7 @@ gtk_table_size_allocate_pass1 (GtkTable *table)
|
||||
if (table->rows[row].shrink)
|
||||
{
|
||||
extra = height / nshrink;
|
||||
table->rows[row].allocation = MAX (1, table->rows[row].allocation - extra);
|
||||
table->rows[row].allocation = MAX (1, (gint)table->rows[row].allocation - extra);
|
||||
|
||||
height -= extra;
|
||||
nshrink -= 1;
|
||||
@ -1487,7 +1487,7 @@ gtk_table_size_allocate_pass2 (GtkTable *table)
|
||||
|
||||
if (child->xfill)
|
||||
{
|
||||
allocation.width = MAX (1, max_width - child->xpadding * 2);
|
||||
allocation.width = MAX (1, max_width - (gint)child->xpadding * 2);
|
||||
allocation.x = x + (max_width - allocation.width) / 2;
|
||||
}
|
||||
else
|
||||
@ -1498,7 +1498,7 @@ gtk_table_size_allocate_pass2 (GtkTable *table)
|
||||
|
||||
if (child->yfill)
|
||||
{
|
||||
allocation.height = MAX (1, max_height - child->ypadding * 2);
|
||||
allocation.height = MAX (1, max_height - (gint)child->ypadding * 2);
|
||||
allocation.y = y + (max_height - allocation.height) / 2;
|
||||
}
|
||||
else
|
||||
|
@ -928,7 +928,7 @@ gtk_tree_size_allocate (GtkWidget *widget,
|
||||
{
|
||||
child_allocation.x = GTK_CONTAINER (tree)->border_width;
|
||||
child_allocation.y = GTK_CONTAINER (tree)->border_width;
|
||||
child_allocation.width = MAX (1, allocation->width - child_allocation.x * 2);
|
||||
child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2);
|
||||
|
||||
children = tree->children;
|
||||
|
||||
|
@ -551,11 +551,11 @@ gtk_tree_item_size_allocate (GtkWidget *widget,
|
||||
gtk_widget_size_allocate (item->pixmaps_box, &child_allocation);
|
||||
|
||||
child_allocation.y = GTK_CONTAINER (widget)->border_width;
|
||||
child_allocation.height = MAX (1, allocation->height - child_allocation.y * 2);
|
||||
child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2);
|
||||
child_allocation.x += item->pixmaps_box->requisition.width+DEFAULT_DELTA;
|
||||
|
||||
child_allocation.width =
|
||||
MAX (1, allocation->width - (child_allocation.x + border_width));
|
||||
MAX (1, (gint)allocation->width - ((gint)child_allocation.x + border_width));
|
||||
|
||||
gtk_widget_size_allocate (bin->child, &child_allocation);
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ gtk_vbox_size_allocate (GtkWidget *widget,
|
||||
|
||||
y = allocation->y + GTK_CONTAINER (box)->border_width;
|
||||
child_allocation.x = allocation->x + GTK_CONTAINER (box)->border_width;
|
||||
child_allocation.width = MAX (1, allocation->width - GTK_CONTAINER (box)->border_width * 2);
|
||||
child_allocation.width = MAX (1, (gint)allocation->width - (gint)GTK_CONTAINER (box)->border_width * 2);
|
||||
|
||||
children = box->children;
|
||||
while (children)
|
||||
@ -238,7 +238,7 @@ gtk_vbox_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (child->fill)
|
||||
{
|
||||
child_allocation.height = MAX (1, child_height - child->padding * 2);
|
||||
child_allocation.height = MAX (1, child_height - (gint)child->padding * 2);
|
||||
child_allocation.y = y + child->padding;
|
||||
}
|
||||
else
|
||||
@ -291,7 +291,7 @@ gtk_vbox_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (child->fill)
|
||||
{
|
||||
child_allocation.height = MAX (1, child_height - child->padding * 2);
|
||||
child_allocation.height = MAX (1, child_height - (gint)child->padding * 2);
|
||||
child_allocation.y = y + child->padding - child_height;
|
||||
}
|
||||
else
|
||||
|
@ -449,8 +449,8 @@ gtk_viewport_realize (GtkWidget *widget)
|
||||
attributes.y = 0;
|
||||
}
|
||||
|
||||
attributes.width = MAX (1, widget->allocation.width - attributes.x * 2 - border_width * 2);
|
||||
attributes.height = MAX (1, widget->allocation.height - attributes.y * 2 - border_width * 2);
|
||||
attributes.width = MAX (1, (gint)widget->allocation.width - attributes.x * 2 - border_width * 2);
|
||||
attributes.height = MAX (1, (gint)widget->allocation.height - attributes.y * 2 - border_width * 2);
|
||||
attributes.event_mask = 0;
|
||||
|
||||
viewport->view_window = gdk_window_new (widget->window, &attributes, attributes_mask);
|
||||
|
@ -174,7 +174,7 @@ gtk_vpaned_size_allocate (GtkWidget *widget,
|
||||
paned->groove_rectangle.height);
|
||||
}
|
||||
|
||||
child1_allocation.width = child2_allocation.width = MAX (1, allocation->width - border_width * 2);
|
||||
child1_allocation.width = child2_allocation.width = MAX (1, (gint)allocation->width - border_width * 2);
|
||||
child1_allocation.height = paned->child1_size;
|
||||
child1_allocation.x = child2_allocation.x = border_width;
|
||||
child1_allocation.y = border_width;
|
||||
@ -186,7 +186,7 @@ gtk_vpaned_size_allocate (GtkWidget *widget,
|
||||
paned->groove_rectangle.width = allocation->width;
|
||||
|
||||
child2_allocation.y = paned->groove_rectangle.y + paned->gutter_size / 2 + 1;
|
||||
child2_allocation.height = MAX (1, allocation->height
|
||||
child2_allocation.height = MAX (1, (gint)allocation->height
|
||||
- child2_allocation.y - border_width);
|
||||
|
||||
/* Now allocate the childen, making sure, when resizing not to
|
||||
|
Loading…
Reference in New Issue
Block a user