Commit 47787c62 authored by Philipp Erhardt's avatar Philipp Erhardt
Browse files

Implement configurable overlay text

parent d0304365
......@@ -148,6 +148,9 @@ VARIABLES
'float' *screen_scroll_factor* ::
0.9: Factor for scrolling the screen. Should be \<= 1 to create an overlapping region.
'string' *page_overlay_text* ::
Page %1/%2: The text in the bottom right corner.
'int' *useless_gap* ::
2: Gap between two pages in 'grid layout' in pixels.
'int' *min_page_width* ::
......
......@@ -5,6 +5,7 @@ default_layout=presentation
mouse_wheel_factor=120
smooth_scroll_delta=30
screen_scroll_factor=0.9
page_overlay_text=Page %1/%2
useless_gap=2
min_page_width=150
min_zoom=-14
......
......@@ -161,7 +161,7 @@ Layout *Canvas::get_layout() const {
}
void Canvas::update_page_overlay() {
QString overlay_text = QString("page %1/%2")
QString overlay_text = CFG::get_instance()->get_value("page_overlay_text").toString()
.arg(cur_layout->get_page() + 1)
.arg(viewer->get_res()->get_page_count());
page_overlay->setText(overlay_text);
......
......@@ -22,6 +22,9 @@ void CFG::init_defaults() {
defaults["mouse_wheel_factor"] = 120; // (qt-)delta for turning the mouse wheel 1 click
defaults["smooth_scroll_delta"] = 30; // pixel scroll offset
defaults["screen_scroll_factor"] = 0.9; // creates overlap for scrolling 1 screen down, should be <= 1
defaults["page_overlay_text"] = "Page %1/%2";
// layout options
defaults["useless_gap"] = 2;
defaults["min_page_width"] = 150;
......
Supports Markdown
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