Skip to content

Commit

Permalink
listview: add explicit casts to int
Browse files Browse the repository at this point in the history
  • Loading branch information
cboxdoerfer committed Sep 24, 2021
1 parent 39591fd commit cc761e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/fsearch_list_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ fsearch_list_view_convert_view_to_canvas_coords(FsearchListView *view,
int *y_canvas) {

cairo_rectangle_int_t canvas_rect;
canvas_rect.x = gtk_adjustment_get_value(view->hadjustment);
canvas_rect.y = gtk_adjustment_get_value(view->vadjustment);
canvas_rect.x = (int)gtk_adjustment_get_value(view->hadjustment);
canvas_rect.y = (int)gtk_adjustment_get_value(view->vadjustment);
canvas_rect.width = gdk_window_get_width(view->bin_window);
canvas_rect.height = gdk_window_get_height(view->bin_window);

Expand Down Expand Up @@ -382,8 +382,8 @@ fsearch_list_view_draw_list(GtkWidget *widget, GtkStyleContext *context, cairo_t

const int columns_width = fsearch_list_view_get_columns_effective_width(view);
cairo_rectangle_int_t canvas_rect;
canvas_rect.x = -gtk_adjustment_get_value(view->hadjustment);
canvas_rect.y = -gtk_adjustment_get_value(view->vadjustment);
canvas_rect.x = -(int)gtk_adjustment_get_value(view->hadjustment);
canvas_rect.y = -(int)gtk_adjustment_get_value(view->vadjustment);
canvas_rect.width = gdk_window_get_width(view->bin_window);
canvas_rect.height = gdk_window_get_height(view->bin_window);

Expand Down

0 comments on commit cc761e2

Please sign in to comment.