* Remove the ImplicitDefaultAction intelligence, so ToggleActionMenu is
not more than a KActionMenu with setDefaultAction().
* Instead, reset the default action when it gets removed from the menu().
This is done by filtering QActionEvent from menu().
* Add an autotest for ToggleActionMenu.
This replaces prior efforts to fix problems in ToggleActionMenu
in !245 and !254, following the discussion on the virtual meeting
at 2021-02-26.
6b26a2b4b and 1786e6c99 have already ported PageView and
AnnotationActionHandler to the simplified interface.
The coordinates in Viewport.rePos are normalized on the full page. In
two functions within pageview.cpp, these were treated as coordinates on
the cropped page.
CCBUG: 198427
This partially fixes the bug 198427 in the case that the cropping of the
target pages (and the pages around the target) is known at the time the
link is clicked. That is, it works if
- One uses 'Trim To Selection'
- One uses 'Trim To Margin' and has already viewed at the target
page(s).
In the case that the cropping of the page at the target is unknown, we
still end up at the wrong position.
This commit makes the "Show Sidebar" button that's on the toolbar by
default use the new `sidebar-expand` icon, if present. If not, it falls
back to the old `view-sidetree` icon for compatibility's sake.
We also make thie button icons-only by default, as the new icon is
clearer than the old one. This saves some horizontal space in the
defualt toolbar, which is now quite wide.
Reason in this context is
(Optional) The reason for the signing, such as ( I agree ... ).
But since it's not really obvious what it means, showing
Reason: Not Available
is probably more weird to users than simply not showing it at all
It's still not perfect because it probably won't show the signature
since signatures "usually" go to the bottom of the page and we're only
focusing on that page, which means the beginning which depending on zoom
settings may very well not include the signature, but at least it's
closer
Use black for text color and border (instead of default red)
Also force the date to have timezone info, i.e.
2021-04-13T15:32:29+02:00
instead of
2021-04-13T15:32:29
Toggling the Continuous mode while opening multiple tabs caused an issue
in Okular, in which it considered it a global setting. So, toggling it
for one document, then toggling it again for the other documents may not
take effect. This should fix it by considering this setting a per
document setting, and therefore toggling the mode for one document
shouldn't have any effect for other documents.
BUGS: 422080
The current code goes through KMimeTypeTrader to find a ps or PDF part.
In both cases it's highly likely that it will be okularpart so we can use that directly.
QLayout: Attempting to add QLayout "" to DlgGeneral "", which already has a layout
QLayout: Attempting to add QLayout "" to DlgPresentation "", which already has a layout
This creates CursorWrapHelper, which wraps the cursor
from e. g. top screen edge to bottom screen edge,
and calculates the drag offset from the actual cursor movement.
The method qApp->devicePixelRatio() should only be used under
special circumstances. The documentation of QGuiApplication says:
"Returns the highest screen device pixel ratio found on the system.
[...] Use this function only when you don't know which window
you are targeting. If you do know the target window,
use QWindow::devicePixelRatio() instead."
The Okular code used qApp->devicePixelRatio() a few times without
reason. Few people noticed this, because apparently only Windows
and Wayland can set per-screen dprs. This patch replaces those
calls with the correct QWindow call.
Right now Okular defaults to opening an already-open document in a new
tab when opened a second time, which is a bit odd. Most other
document-based apps will switch to the existing document's instance
instead of opening a new instance of it.
Interestingly enough, Okular has an option to do this, but it's off by
default. I think on by default makes more sense here, to be consistent
with other document-based apps. Since the option exists, people who have
a specialized use case that commonly involves opening multiple instances
of the same document can toggle the option to have that. Everyone wins!
BUG: 432942
FIXED-IN: 21.04