Commit graph

9 commits

Author SHA1 Message Date
snooxx 💤 1d30b03e39
Bring corner radius of popup messages in line with widget style
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.
2022-03-08 16:38:19 +00:00
snooxx 💤 667e73325a
Restore properly rounded corners of popup messages
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.
2022-03-07 14:01:53 +00:00
Volker Krause 50d0703ae0 Enable readability-braces-around-statements 2022-03-09 23:29:56 +01:00
Kai Uwe Broulik 8eca2bfa9d [PageViewMessage] Resolve icon on the fly
Use `PM_SmallIconSize` for size calculation exclusively and
then have `QPainter` resolve it to the correct device pixel
ratio during paint.
2021-11-23 21:55:01 +01:00
Alexander Lohnau ac083e44e3 Make meaning of sponsoring note more clear 2021-06-10 08:11:56 +00:00
Alexander Lohnau 24c75071be Move sponsoring note outside of SPDX-FileCopyrightText statement 2021-06-10 08:11:56 +00:00
Alexander Lohnau 2f193a63de Convert license headers to SPDX 2021-06-10 08:11:56 +00:00
Nicolas Fella ef5254b020 Remove some unused includes 2021-04-25 14:27:46 +02:00
David Hurka 19d5dd8ec7 New part/ directory for okularpart sources from /, ui/, conf/
Source files are no longer separated by UI and non-UI and similar,
but only by their build target.

* ui/ -> part/
* Move all source files from conf/ to part/
* Keep config skeleton definitions in conf/, needed for the mobile target too
* Move editdrawingtooldialogtest.h from conf/autotests/ to autotests/
* ui/data/icons/ -> icons/
* Move /part.cpp, /part.rc and similar files to part/
* Adapt include paths in source files
* Adapt CMakeLists.txt files (in / and in subdirectories)
* Adapt /Messages.sh
2020-11-18 19:32:56 +00:00
Renamed from ui/pageviewutils.cpp (Browse further)