mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:36:00 +01:00
Added fullscreen mode for special shortcuts
This commit is contained in:
parent
ecfe451807
commit
9936e31095
2 changed files with 59 additions and 47 deletions
|
@ -108,6 +108,12 @@ Shortcut shortcuts[] = {
|
||||||
{0, GDK_l, sc_navigate_index, INDEX, { EXPAND } },
|
{0, GDK_l, sc_navigate_index, INDEX, { EXPAND } },
|
||||||
{0, GDK_space, sc_navigate_index, INDEX, { SELECT } },
|
{0, GDK_space, sc_navigate_index, INDEX, { SELECT } },
|
||||||
{0, GDK_Return, sc_navigate_index, INDEX, { SELECT } },
|
{0, GDK_Return, sc_navigate_index, INDEX, { SELECT } },
|
||||||
|
{0, GDK_F5, sc_toggle_fullscreen, FULLSCREEN, {0} },
|
||||||
|
{0, GDK_Left, sc_navigate, FULLSCREEN, { PREVIOUS } },
|
||||||
|
{0, GDK_Up, sc_navigate, FULLSCREEN, { PREVIOUS } },
|
||||||
|
{0, GDK_Down, sc_navigate, FULLSCREEN, { NEXT } },
|
||||||
|
{0, GDK_Right, sc_navigate, FULLSCREEN, { NEXT } },
|
||||||
|
{0, GDK_space, sc_navigate, FULLSCREEN, { NEXT } },
|
||||||
};
|
};
|
||||||
|
|
||||||
/* inputbar shortcuts */
|
/* inputbar shortcuts */
|
||||||
|
|
|
@ -28,7 +28,7 @@ enum { NEXT, PREVIOUS, LEFT, RIGHT, UP, DOWN,
|
||||||
FORWARD, BACKWARD, ADJUST_BESTFIT, ADJUST_WIDTH,
|
FORWARD, BACKWARD, ADJUST_BESTFIT, ADJUST_WIDTH,
|
||||||
ADJUST_NONE, CONTINUOUS, DELETE_LAST, ADD_MARKER,
|
ADJUST_NONE, CONTINUOUS, DELETE_LAST, ADD_MARKER,
|
||||||
EVAL_MARKER, INDEX, EXPAND, COLLAPSE, SELECT,
|
EVAL_MARKER, INDEX, EXPAND, COLLAPSE, SELECT,
|
||||||
GOTO_DEFAULT, GOTO_LABELS, GOTO_OFFSET};
|
GOTO_DEFAULT, GOTO_LABELS, GOTO_OFFSET, FULLSCREEN };
|
||||||
|
|
||||||
/* typedefs */
|
/* typedefs */
|
||||||
struct CElement
|
struct CElement
|
||||||
|
@ -1803,6 +1803,11 @@ sc_toggle_fullscreen(Argument* argument)
|
||||||
gtk_widget_hide(GTK_WIDGET(Zathura.UI.inputbar));
|
gtk_widget_hide(GTK_WIDGET(Zathura.UI.inputbar));
|
||||||
gtk_widget_hide(GTK_WIDGET(Zathura.UI.statusbar));
|
gtk_widget_hide(GTK_WIDGET(Zathura.UI.statusbar));
|
||||||
|
|
||||||
|
Argument arg;
|
||||||
|
arg.n = ADJUST_BESTFIT;
|
||||||
|
sc_adjust_window(&arg);
|
||||||
|
|
||||||
|
Zathura.Global.mode = FULLSCREEN;
|
||||||
fs = FALSE;
|
fs = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1811,6 +1816,7 @@ sc_toggle_fullscreen(Argument* argument)
|
||||||
gtk_widget_show(GTK_WIDGET(Zathura.UI.inputbar));
|
gtk_widget_show(GTK_WIDGET(Zathura.UI.inputbar));
|
||||||
gtk_widget_show(GTK_WIDGET(Zathura.UI.statusbar));
|
gtk_widget_show(GTK_WIDGET(Zathura.UI.statusbar));
|
||||||
|
|
||||||
|
Zathura.Global.mode = NORMAL;
|
||||||
fs = TRUE;
|
fs = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue