Possibly introduced by commit 50d0703a.
part/pageview.cpp: In member function 'virtual void PageView::mouseReleaseEvent(QMouseEvent*)':
part/pageview.cpp:3077: error: expected '}' before 'else'
part/pageview.cpp:3069: note: to match this '{'
After fixing the porting mistake done in 78d983ee, `drawRoundedRect` can
be further simplified to not use any relative sizes anymore.
We can also assume that the code in `dviRenderer::epsf_special` was
supposed to use a constant corner radius and therefore was wrong
initially. By dropping `Qt::RelativeSize` the code might become closer
to its originally intended behavior.
Test Plan:
- No change in behavior for rounded corners of "Welcome" popup message
and "No Annotations" message in sidebar.
- Could not test DVI code path.
In 0070baaf `PageViewMessage` to display on-canvas notifications was
introduced, featuring rounded corners. Over the years, overall
preferences in the industry regarding the corner radius have changed
multiple times, with recent efforts trying to ensure a more consistent
usage in the entire UI of KDE's products.
Let's use a corner radius better matching the radius commonly used in
the current widget style, i.e. a bit less rounded, to make the message
fit in better with surrounding buttons and frames. Note that this is not
specific to Breeze, since most widget styles nowadays use a similar
corner radius. The radius is compatible with `KTextEditor::Message` too,
which is used in a similar context.
Test Plan:
- Start Okular: The "Welcome" message and the "Document Loaded"
message have a more professional look to them.
- Open the annotations sidebar: The "No Annotations" message better
fits in with the sidebar's frame.
The MR
1. adds a note, that the tests in the build tree depend on the install tree.
2. extends the QT_PLUGIN_PATH with KDE_INSTALL_FULL_QTPLUGINDIR in cmake before creating the tests. That removes the need to source prefix.sh before calling cmake.
78d983ee led to some rounded corners in the UI not being perfectly
circular anymore: Popup messages would stretch the rounding depending on
message length, and the rounded corner of the message in the annotation
bar would get distorted while changing the sidebar's width.
That commit tried to fix the following `warning: ‘void
QPainter::drawRoundRect(int, int, int, int, int, int)’ is deprecated:
Use drawRoundedRect(..., Qt::RelativeSize)` by changing to
`drawRoundedRect`, but missed to also add `Qt::RelativeSize`.
Adding the missing flag fixes both issues. The change is also
implemented in `dviRenderer::epsf_special` (introduced in be544056,
changed in 55dc43bf) for correctness.
Test Plan:
- Start Okular. The "Welcome" message and the "Document Loaded"
message have perfectly rounded corners again, not depending
on message length.
- Change width of the annotations sidebar: The "No Annotations"
message does not change its rounded corners anymore.
- Running in HiDPI mode retains the correct behavior.
- Note: There does not seem to be a trivial/convenient way to trigger
the DVI code path.
After 19d98d6a reformatted Okular's codebase with `clang-format`, that
commit was marked to be ignored by `git blame` by adding it to
`.git-blame-ignore-revs` in 4fb45522.
Later, !296 was merged but still needed reformatting, which was done in
b09e23f6. However, the latter commit was still missing from
`.git-blame-ignore-revs`, so let's add it.
Test Plan:
All commits mentioning `clang-format` which reformatted the codebase are
now included in `.git-blame-ignore-revs`.
Make it more similar to how we handle the format event.
We pass the new value to processKeystrokeAction, that calls the script
and sets the new value for the form object according to the result. If
needed the widget is refreshed to reflect the new text
The `MiniBar` normally used to display page numbers and to provide
navigation buttons regressed since 01557c16c4 to only show an empty
non-functional button called "Page Number", along with multiple
warnings:
`QObject::connect(MiniBar, QAction): invalid nullptr parameter`
This is caused by moving `setupViewerActions()` to a place where
`m_miniBar` is not initialized yet, even though it has a runtime
`connect`-dependency on it.
By moving `setupViewerActions()` back, the `MiniBar` starts working
again. Now the `m_addBookmark` action, which is created in that
function, is not available anymore to be passed to the constructor of
`BookmarkList`. To avoid moving the setup of the latter away from the
rest of the sidebar code, only assigning the action to the bookmark
button contained in the `BookmarkList` is deferred to
`setupViewerActions()`.
As requested, any accidental future `nullptr`-access will be handled by
crashing, even in Release builds, by omitting any checks.
BUG: 450347
Test Plan:
Page numbers show up again in toolbar, no more `connect` warnings.
Added context menu entry to quick sync thumbnails with the current page. This is handy in case the user is not using "Link the thumbnails with the page" and wants quick sync thumbnails without changing settings or search for the page in the thumbnails view.
Before
![image](/uploads/389216ce4720f1891ddc4f2bf8ee14ea/image.png)
After
![image](/uploads/b4804d11992695d3a6be6642c9d7ac16/image.png)