Commit eab24791 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Some more clean up

parent b8e82e8f
......@@ -131,7 +131,7 @@ cb_view_vadjustment_value_changed(GtkAdjustment* adjustment, gpointer data)
const double position_x = zathura_document_get_position_x(zathura->document);
const double position_y = zathura_adjustment_get_ratio(adjustment);
unsigned int page_id = position_to_page_number(zathura->document, position_x, position_y);
const unsigned int page_id = position_to_page_number(zathura->document, position_x, position_y);
zathura_document_set_position_x(zathura->document, position_x);
zathura_document_set_position_y(zathura->document, position_y);
......
......@@ -1124,9 +1124,9 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char*
GtkAdjustment* vadjustment = gtk_scrolled_window_get_vadjustment(
GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view));
const unsigned int view_width = (unsigned int)floor(gtk_adjustment_get_page_size(hadjustment));
const unsigned int view_width = floor(gtk_adjustment_get_page_size(hadjustment));
zathura_document_set_viewport_width(zathura->document, view_width);
const unsigned int view_height = (unsigned int)floor(gtk_adjustment_get_page_size(vadjustment));
const unsigned int view_height = floor(gtk_adjustment_get_page_size(vadjustment));
zathura_document_set_viewport_height(zathura->document, view_height);
zathura_update_view_ppi(zathura);
......@@ -1135,7 +1135,7 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char*
cb_widget_screen_changed(zathura->ui.session->gtk.view, NULL, zathura);
/* get initial device scale */
int device_factor = gtk_widget_get_scale_factor(zathura->ui.session->gtk.view);
const int device_factor = gtk_widget_get_scale_factor(zathura->ui.session->gtk.view);
zathura_document_set_device_factors(zathura->document, device_factor, device_factor);
/* create blank pages */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment