mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 20:53:46 +01:00
Some refactoring.
This commit is contained in:
parent
24345dafba
commit
b244e016d0
@ -78,13 +78,9 @@ cb_view_vadjustment_value_changed(GtkAdjustment* GIRARA_UNUSED(adjustment), gpoi
|
|||||||
for (unsigned int page_id = 0; page_id < zathura->document->number_of_pages; page_id++) {
|
for (unsigned int page_id = 0; page_id < zathura->document->number_of_pages; page_id++) {
|
||||||
zathura_page_t* page = zathura->document->pages[page_id];
|
zathura_page_t* page = zathura->document->pages[page_id];
|
||||||
|
|
||||||
page_offset_t offset;
|
|
||||||
gtk_widget_translate_coordinates(page->drawing_area,
|
|
||||||
zathura->ui.session->gtk.view, 0, 0, &offset.x, &offset.y);
|
|
||||||
|
|
||||||
GdkRectangle page_rect;
|
GdkRectangle page_rect;
|
||||||
page_rect.x = offset.x;
|
gtk_widget_translate_coordinates(page->drawing_area,
|
||||||
page_rect.y = offset.y;
|
zathura->ui.session->gtk.view, 0, 0, &page_rect.x, &page_rect.y);
|
||||||
page_rect.width = page->width * zathura->document->scale;
|
page_rect.width = page->width * zathura->document->scale;
|
||||||
page_rect.height = page->height * zathura->document->scale;
|
page_rect.height = page->height * zathura->document->scale;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user