mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-16 06:25:52 +01:00
use getter functions to make it compatible with GTK+3
This commit is contained in:
parent
f28642792d
commit
5dacede692
2 changed files with 3 additions and 2 deletions
|
@ -391,7 +391,7 @@ redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle)
|
||||||
grect.y = rectangle->y1;
|
grect.y = rectangle->y1;
|
||||||
grect.width = rectangle->x2 - rectangle->x1;
|
grect.width = rectangle->x2 - rectangle->x1;
|
||||||
grect.height = rectangle->y2 - rectangle->y1;
|
grect.height = rectangle->y2 - rectangle->y1;
|
||||||
gdk_window_invalidate_rect(GTK_WIDGET(widget)->window, &grect, TRUE);
|
gdk_window_invalidate_rect(gtk_widget_get_parent_window(GTK_WIDGET(widget)), &grect, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
3
utils.c
3
utils.c
|
@ -263,7 +263,8 @@ recalc_rectangle(zathura_page_t* page, zathura_rectangle_t rectangle)
|
||||||
void
|
void
|
||||||
set_adjustment(GtkAdjustment* adjustment, gdouble value)
|
set_adjustment(GtkAdjustment* adjustment, gdouble value)
|
||||||
{
|
{
|
||||||
gtk_adjustment_set_value(adjustment, MAX(adjustment->lower, MIN(adjustment->upper - adjustment->page_size, value)));
|
gtk_adjustment_set_value(adjustment, MAX(gtk_adjustment_get_lower(adjustment),
|
||||||
|
MIN(gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment), value)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue