Commit graph

9290 commits

Author SHA1 Message Date
Nicolas Fella ef5254b020 Remove some unused includes 2021-04-25 14:27:46 +02:00
Yuri Chornoivan 62fea843e8 Update screenshot 2021-04-24 09:16:11 +03:00
shenleban tongying 1855f9e4b1 Patch: Let form and sign interface to respect the OSD setting 2021-04-23 03:44:44 +00:00
David Hurka 5a58d3bb8e Simplify ToggleActionMenu
* 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.
2021-04-23 01:54:42 +00:00
Albert Astals Cid 394001017e Merge remote-tracking branch 'origin/release/21.04' 2021-04-22 22:01:23 +02:00
l10n daemon script 74c92306b8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-04-21 01:16:32 +00:00
Gerd Wachsmuth 61551d2356 Fix: Viewport coords normalized w.r.t. full page
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.
2021-04-20 07:48:51 +02:00
l10n daemon script 218c5ab64e GIT_SILENT made messages (after extraction) 2021-04-17 01:48:51 +00:00
l10n daemon script 41d3bedc41 GIT_SILENT made messages (after extraction) 2021-04-17 00:18:37 +00:00
Albert Astals Cid 89a90cf0b5 Merge remote-tracking branch 'origin/release/21.04' 2021-04-15 16:44:45 +02:00
Nate Graham dea517bb69 Use icons-only "Show Sidebar" Button with new icon, if available
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.
2021-04-14 16:31:52 -06:00
Albert Astals Cid e3f5df3154 Signature: Don't show "Reason: Not Available" if there's no signing reason
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
2021-04-14 22:05:38 +02:00
Albert Astals Cid ff5f4cbc45 Open the signed document on the page with the new signature
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
2021-04-14 22:05:38 +02:00
Heiko Becker e6dae5d4f9 GIT_SILENT Update Appstream for new release
(cherry picked from commit 8bdc851688)
2021-04-14 17:11:17 +02:00
Heiko Becker 8bdc851688 GIT_SILENT Update Appstream for new release 2021-04-14 17:11:17 +02:00
Heiko Becker e8e4cd7c6d GIT_SILENT Upgrade release service version to 21.04.0. 2021-04-14 16:54:23 +02:00
Albert Astals Cid 19355a42d7 Slight improvement to signature look&feel
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
2021-04-13 15:33:08 +02:00
David Hurka 6b26a2b4bd Port PageView to simplified ToggleActionMenu 2021-04-11 17:55:51 +00:00
David Hurka 2e1ddaa109 Enable horizontal mouse wrap for Browse tool drag scrolling
Also fixes calculation of wrap edges, where top and bottom edge were swapped.

BUG: 371904
2021-04-11 09:56:41 +00:00
Albert Astals Cid 8a39d598af Merge remote-tracking branch 'origin/release/21.04' 2021-04-10 11:30:02 +02:00
Albert Astals Cid 0584660125 partest: Fix one test interfering with the next
Cleanup settings and docdata in between tests
2021-04-10 08:48:15 +00:00
Albert Astals Cid c9a4e223e3 Fix version on doc
We abandoned the 1.x version a while ago
2021-04-10 00:18:10 +02:00
Albert Astals Cid f7ea32c129 Don't call i18n before constructing QApplication
It doesn't work
2021-04-09 21:41:23 +00:00
David Faure 6b3da83f69 Merge remote-tracking branch 'origin/release/21.04' 2021-04-09 23:15:32 +02:00
David Faure c118ab9482 Fix valgrind warning about uninit variables 2021-04-09 12:39:12 +02:00
Yuri Chornoivan 7b93e8cc33 Add the new continuous mode option to the docs 2021-04-09 11:17:23 +03:00
Heiko Becker 10a447eadf GIT_SILENT Upgrade release service version to 21.03.90. 2021-04-09 08:03:07 +02:00
Nate Graham 0906d5ea0a Merge branch 'release/21.04' 2021-04-08 19:22:15 -06:00
Gerd Wachsmuth 0a23d4a001 Fix a bug with zoom levels on cropped pages
BUG: 342003

Uses ideas of https://bugs.kde.org/show_bug.cgi?id=342003#c5
2021-04-08 22:27:20 +02:00
Mahmoud Khalil aa0d1b459b Fixes changing continuous mode while on tabs issue
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
2021-04-07 23:39:55 +02:00
Nicolas Fella 00b60aec24 [print preview] Load okular part directly
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.
2021-04-06 22:20:01 +00:00
Albert Astals Cid 77269a8025 Merge remote-tracking branch 'origin/release/21.04' 2021-04-05 21:01:05 +02:00
Yuri Chornoivan c818984950 Update screenshots 2021-04-05 14:57:46 +03:00
Albert Astals Cid d3b2317ab7 conf: Fix layout warnings
QLayout: Attempting to add QLayout "" to DlgGeneral "", which already has a layout
QLayout: Attempting to add QLayout "" to DlgPresentation "", which already has a layout
2021-04-05 10:35:21 +00:00
Albert Astals Cid 997e1d9137 Fix playing RichMedia annotations
BUGS: 434962
2021-04-05 11:41:02 +02:00
David Hurka 01c240c06d Fix white background flashing up when using Invert Lightness/Luma
These color modes make white background black,
but PagePainter wasn’t updated to draw black background
when pixmaps are not yet available.

BUG: 431372
2021-04-04 14:46:00 +02:00
David Hurka 1786e6c99a Port AnnotationActionHandler’s shape and stamp menus to simplified ToggleActionMenu 2021-03-30 17:04:13 +00:00
Yuri Chornoivan 931dca1514 If FB has multiple authors, show them all 2021-03-27 18:28:03 +02:00
Yuri Chornoivan d195ab4e9a If FB has multiple authors, show them all 2021-03-27 16:24:02 +00:00
Albert Astals Cid fdac24ced9 Merge remote-tracking branch 'origin/release/21.04' 2021-03-26 00:12:30 +01:00
David Hurka 67325270ec Fix viewport jumps when drag-scrolling beyond screen edges
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.
2021-03-25 12:22:19 +00:00
Albert Astals Cid c38af3e695 Add a few more formats supported by qimageformat plugins
BUGS: 434888
BUGS: 434889
2021-03-24 23:42:05 +01:00
Carl Schwan 4e071d6969 Merge branch 'release/21.04' 2021-03-22 22:16:25 +01:00
Carl Schwan c8146dac80 Update screenshots in metadata 2021-03-22 22:15:44 +01:00
David Hurka d71929ffda Config dialog: Make screen combo box update in realtime
Makes PreferredScreenSelector repopulate itself when screens are added or removed;
using QApplication::screenAdded/Removed() signals.
2021-03-20 18:34:12 +00:00
Oliver Sander 7ffd08aafb Use device pixel ratio for the correct screen
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.
2021-03-19 07:27:22 +00:00
Nate Graham c07944e6c6 Merge branch 'release/21.04' 2021-03-17 17:40:18 -06:00
Nate Graham 157377b007 Fix multi-document open test failure
Fixes the test failure introduced with
d0b9b138cc.
2021-03-17 16:28:50 -06:00
Nate Graham 6552d8c933 Merge branch 'release/21.04' 2021-03-17 10:02:57 -06:00
Nate Graham d0b9b138cc Switch to existing document in new tab by default
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
2021-03-17 10:00:54 -06:00