mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 05:01:09 +00:00
Always use gint for border_width
This avoids an evil trap when doing MAX (..., ... - 2 * border_width) and the expression on the right gets promoted to unsigned, instead of going negative as you would expect. https://bugzilla.gnome.org/show_bug.cgi?id=699633
This commit is contained in:
parent
38688cad00
commit
3b4804bbf1
@ -512,7 +512,7 @@ gtk_alignment_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation child_allocation;
|
||||
GtkWidget *child;
|
||||
gint width, height;
|
||||
guint border_width;
|
||||
gint border_width;
|
||||
gint padding_horizontal, padding_vertical;
|
||||
gint baseline;
|
||||
|
||||
|
@ -816,7 +816,7 @@ gtk_frame_real_compute_child_allocation (GtkFrame *frame,
|
||||
GtkAllocation allocation;
|
||||
GtkBorder padding;
|
||||
gint top_margin;
|
||||
guint border_width;
|
||||
gint border_width;
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
get_padding_and_border (frame, &padding);
|
||||
|
@ -2459,7 +2459,7 @@ gtk_notebook_size_allocate (GtkWidget *widget,
|
||||
|
||||
if (priv->children)
|
||||
{
|
||||
guint border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
gint border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
|
||||
GtkNotebookPage *page;
|
||||
GtkAllocation child_allocation;
|
||||
GList *children;
|
||||
|
@ -318,7 +318,7 @@ viewport_get_view_allocation (GtkViewport *viewport,
|
||||
GtkStyleContext *context;
|
||||
GtkStateFlags state;
|
||||
GtkBorder padding, border;
|
||||
guint border_width;
|
||||
gint border_width;
|
||||
|
||||
gtk_widget_get_allocation (widget, &allocation);
|
||||
border_width = gtk_container_get_border_width (GTK_CONTAINER (viewport));
|
||||
|
@ -6357,7 +6357,7 @@ _gtk_window_set_allocation (GtkWindow *window,
|
||||
GtkWidget *widget = (GtkWidget *)window;
|
||||
GtkWindowPrivate *priv = window->priv;
|
||||
GtkAllocation child_allocation;
|
||||
guint border_width;
|
||||
gint border_width;
|
||||
GtkBorder window_border = { 0 };
|
||||
gint title_height = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user