Summary:
This patch enables HiDPI throughout the application
Every pixmap is multiplied by the devicePixelRatioF
QPainter code is ajusted to take the DPR value into account
All pixmaps get cached with the highest DPR of all screens. When moving the application to another screen, the cache doesn't have to be invalidated.
BUGS: 362856 383589
REVIEW: D6268
Summary:
BUG: 182994
Adds an option to the config dialog that enables background color (the color around the displayed page) to be changed (while by default preserving the Qt toolkit selection as not to affect existing users).
Reasons for this change:
Accessibility, eye strain, aesthetic reasons, color displayed on monitor can affect power consumption (how: depends on display technology).
Many people want this change occording to Bugzilla and other sources.
Maintenance: Nearly no additional maintenance:
This is no new subsystem but a trivial feature with no complex code dependencies, and we are already showing a colour selection dialog and setting colours in other places in Okular.
{F4257766}
Other less important information:
https://git.reviewboard.kde.org/r/130219/https://mail.kde.org/pipermail/okular-devel/2017-September/025520.html
Test Plan:
Tested everything, it all works:
Toggled the custom background color, changed custom background color, removed okular settings file (with: "rm ~/.config/okular*") to verify it uses the usual qt theme colour by default (where the settings file remembered the custom color).
Reviewers: #okular, aacid, elvisangelaccio, rkflx, ngraham
Reviewed By: ngraham
Subscribers: aacid, ltoscano, ngraham
Tags: #okular
Differential Revision: https://phabricator.kde.org/D8051
Summary:
BUG: 182994
Adds an option to the config dialog that enables background color (the color around the displayed page) to be changed (while by default preserving the Qt toolkit selection as not to affect existing users).
Reasons for this change:
Accessibility, eye strain, aesthetic reasons, color displayed on monitor can affect power consumption (how: depends on display technology).
Many people want this change occording to Bugzilla and other sources.
Maintenance: Nearly no additional maintenance:
This is no new subsystem but a trivial feature with no complex code dependencies, and we are already showing a colour selection dialog and setting colours in other places in Okular.
{F4257766}
Other less important information:
https://git.reviewboard.kde.org/r/130219/https://mail.kde.org/pipermail/okular-devel/2017-September/025520.html
Test Plan:
Tested everything, it all works:
Toggled the custom background color, changed custom background color, removed okular settings file (with: "rm ~/.config/okular*") to verify it uses the usual qt theme colour by default (where the settings file remembered the custom color).
Reviewers: #okular, aacid, elvisangelaccio, rkflx, ngraham
Reviewed By: ngraham
Subscribers: aacid, ltoscano, ngraham
Tags: #okular
Differential Revision: https://phabricator.kde.org/D8051
The unit test 'editdrawingtooldialogtest' on the frameworks branch aborts at run-time. Reason: it expects the dialog to have a KLineEdit member with object name 'name'. That KLineEdit does exist in the dialog, but no object name is set for it at all. This patch explicitly sets the object name to 'name', which makes the editdrawingtooldialogtest pass again.
REVIEW: 126158
Changes
C1. Added submenu, moved "Trim margins" (TM mode) to it and added "Trim To Selection" (TS mode).
C2. Activating "Trim To selection" enters a new mousemode, similar to RectSelect for defining a viewport.
C3. Once a viewport has been defined, it serves as a viewport for all pages in the document.
C4. Left/Right pages are not treated differently.
Manual Testing
T1. Switching between modes enforces at most one active.
T2. Can deactivate a mode by selecting it again from the menu.
T3. When draggin bbox selection, clicking outside page does not crash.
T4. When in "Facing Pages" mode, mouse release must be over any page (or is ignored).
T5. Normalized bbox coords are computed relative to page indicated by point of mouse release.
T6. Behave as expected when switching between any pair of No Trim/Trim Margins/Trim To Selection.
T7. TM mode persisted across app restarts (existing behavior).
T8. TS mode forgotten across app restarts (as desired).
T9. Exiting and reselectin "Trim To Selection" prompts for new bbox.
T10. Choosing a small Trim bbox enforces minimium dimensions size (As percentag of total), as
it does in TM mode, because of the "scale big and crop down" implementation, to avoid huge pixmaps.
TS mode minimum set at 20% (vs. TM mode's 50%).
REVIEW: 124716
BUGS: 351156
3 benefits:
* We can set the shortcut in the edit shortcuts dialog as before
* Shortcuts can be activated without showing the topbar as before
* Drawing in the toppbar is exactly as the other actions