mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:46:00 +01:00
Display scoll percentage in statusbar (Closes #58).
Thank's to acieroid.
This commit is contained in:
parent
3b8efee3ed
commit
48a2991333
1 changed files with 3 additions and 1 deletions
|
@ -1514,7 +1514,7 @@ update_status(void)
|
|||
char* zoom_level = (Zathura.PDF.scale != 0) ? g_strdup_printf("%d%%", Zathura.PDF.scale) : g_strdup("");
|
||||
char* goto_mode = (Zathura.Global.goto_mode == GOTO_LABELS) ? "L" :
|
||||
(Zathura.Global.goto_mode == GOTO_OFFSET) ? "O" : "D";
|
||||
char* status_text = g_strdup_printf("%s [%s] %s", zoom_level, goto_mode, Zathura.State.pages);
|
||||
char* status_text = g_strdup_printf("%s [%s] %s (%d%%)", zoom_level, goto_mode, Zathura.State.pages, Zathura.State.scroll_percentage);
|
||||
gtk_label_set_markup((GtkLabel*) Zathura.Global.status_state, status_text);
|
||||
g_free(status_text);
|
||||
g_free(zoom_level);
|
||||
|
@ -2214,6 +2214,8 @@ sc_scroll(Argument* argument)
|
|||
else
|
||||
new_value = (value + scroll_step) > max ? max : (value + scroll_step);
|
||||
|
||||
Zathura.State.scroll_percentage = max == 0 ? 0 : (new_value*100/max);
|
||||
|
||||
if(smooth_scrolling && !ss)
|
||||
{
|
||||
gdouble i;
|
||||
|
|
Loading…
Reference in a new issue