Version: 4.4.3 (using KDE 4.4.2) OS: Linux Installed from: Debian testing/unstable Packages Hello, I often use two view settings: 1. Fit to width, single page (good for reading) 2. Fit page, two facing pages, no scrolling (good for fast browsing and overview) Problem is slow switching from one settings to another -- each time i have to click too many times to reconfigure okular. Nice feature would be toolbar button (with shortcut) to switch between two (or more) presets. This button should be 3-state, becouse user can change setting to match no preset. Each preset should contain everything that is possible to set: - Zoom (Fit page, Fit width, X%,) - View mode (Single page, Facing pages, Overview) - Trim margins (on/off) - Continuous (on/off) Maybe some more options like: - Show navigtion panel - Rotation - Show toolbar/menubar/... I think it should be pretty easy to implement -- one new page in configuration dialog and toolbar button emitting set of signals. It will realy save a lot of time! Thank you and have a nice day. Josef Kufner.
Hello, there is patch implementing this feature: https://github.com/jkufner/Okular/tree/view-presets It adds three toolbar buttons and menu items to okular, each for one preset: Reading, Book and presentation overview. It does not interfere with Okular insides, only invokes three actions at once (zoom, view mode and continuous view). It would be nice to make it configurable, but it is good enough. Commits: e0aa7fc View presets: Menu items b8fb1a0 View Presets: Presentation overview (and drop disabling updates) 75d2744 View Presets: Reading 913ae6d View Preset: Book
Hi Josef, I'm not sold on the idea, can you please try to explain better what are the benefits and why this should be in okular mainline? Thanks for the code.
I found, that I use two view settings. But switching between them means I have to click three toolbar buttons. So I made one button for that. Real world scenario looks like this: I open unknown book in PDF and click "Book" preset. Now I see pages as in real bok and I can easily browse this book using PgUp/PgDown to get idea, what it contains. But since my laptop display has only 14", reading is a bit hard, so I want to "zoom-in" when something interesting is found. But simple zoom is not enough, when interesting information is around bage break, so I want to switch to continuous mode and also to single page view (instead of facing pages) -- now I have "Reading" preset. This feature is not meant to replace current view options, only to make their changing faster. It is in the same category as warpping mouse pointer from bottom to top when scrolling down. I think it would be nice complement for current zoom buttons on toolbar in default configuration. Actualy, I do not use zoom much, only switching between "fit page" and "fit width". Last button is for other very common use case -- overview of presentation slides. I've added it mostly for a consistency, but I use that settings very often too (when I have slides to read). Also, I tried to implement it as least invasive as possible to minimize maintenance costs of this code -- it triggers existing KToggleEvents.
I Josef, I can see the usefulness of this but to be honest i think that shipping the 3 profiles that work for you is a bit too limited, i'd be much in favour of adding a configuration setting page where you can add, edit, etc view profiles so anyone can set the desired profiles he wants to use. What do you think of that?
Yes, in current implementation, it is limited. I had same idea about configuration, but I had not enough time to implement it. So I started with small and good enough feature, and hoping it will become awsome later (I will have a bit more time during summer). I was also thinking about using QtScript to bring even more powerful tool (like macros in World of Warcraft). Becouse such macro is simple string, it is easy to implement configuration GUI. It is easy to understand when kept simple ("zoomFitPage(); viewContinuous(false);" can write almost everyone when good and very short manual is attached to config. dialog), while it can offer a lot of options. This would also allow us to do some magic when such script is passed to Okular via command line arguments (like scripted demonstrations).
I don't think i like the QtScript idea at all, but if you want to get something like this merged it needs to be configurable. You have lots of time until 4.10 that will be released around Januay next year :-)