Commit graph

279 commits

Author SHA1 Message Date
Lukas Hetzenecker
ecc1141e02 HiDPI Support for Okular
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
2017-10-14 14:47:20 +02:00
Albert Freeman
1f6e8a4782 Custom background color
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
2017-10-01 11:31:59 +02:00
Luigi Toscano
d176914e63 Revert "Custom background color"
Wrong authorship for the commit. Commit it again with the correct
information.

CCMAIL: pointedstick@zoho.com
This reverts commit 6b5a7c9a1a.
2017-10-01 11:27:53 +02:00
Nathaniel Graham
6b5a7c9a1a Custom background color
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
2017-09-30 19:45:24 -06:00
Kevin Funk
a53a2402ca clang-tidy: modernize-use-nullptr run
Semi-ACK'd by Albert :)
2017-09-06 00:19:48 +02:00
Montel Laurent
c1e60e5539 Minor 2017-06-02 07:47:56 +02:00
Marco Scarpetta
fa315eb59c Allow to disable automatic search while typing
BUGS: 326522
REVIEW: 129956
2017-03-14 00:31:42 +01:00
Albert Astals Cid
191a37fb52 Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
Albert Astals Cid
b50aff3ed7 Q_NULLPTR -> nullptr 2017-03-02 20:09:32 +01:00
Albert Astals Cid
1747b8b662 Match the spring actually push things up 2016-12-08 22:34:50 +01:00
Albert Vaca
c71f308252 Fixes suggested by Clazy 2016-10-29 16:33:05 +02:00
Albert Astals Cid
62eea3336b Merge remote-tracking branch 'origin/master' into frameworks 2016-10-29 11:13:24 +02:00
Olivier CHURLAUD
62f2cb99f6 Remove a spurious trailing semicolon that issued g++ warnings
Commited on behalf of Oliver Sander
REVIEW: 128673
2016-08-18 16:12:32 +02:00
Olivier CHURLAUD
04908dba2f Adding RTL reading mode feature to okular
Commited on behalf of Fahad Al-Saidi

REVIEW: 125397
BUG: 325650
2016-07-26 01:37:54 +02:00
Martin T. H. Sandsmark
622fce954d Silence unused member variable warning 2016-07-24 19:18:36 +02:00
Olivier CHURLAUD
630269a400 More ports out of KDialog 2016-07-17 02:28:57 +02:00
Olivier CHURLAUD
3d7bea0f80 remove leftover from intermediary tests 2016-07-17 00:57:26 +02:00
Olivier CHURLAUD
6ff419ecba Port away from KButtonGroup 2016-07-17 00:56:11 +02:00
Martin T. H. Sandsmark
67e7ada311 Fix build without implicit cast to/from ascii
See the previous commits for details. This is the last part.
2016-07-11 22:11:43 +02:00
Martin T. H. Sandsmark
439ced872d Port away from signal/slot keyword
When building okular without kdelibs4support it apparently builds with
-DQT_NO_SIGNALS_SLOTS_KEYWORDS.
2016-07-11 19:34:08 +02:00
Albert Vaca
67f69c8871 Merge branch 'master' into frameworks
# Conflicts:
#	CMakeLists.txt
#	active/app/package/metadata.desktop
#	conf/widgetannottools.cpp
#	core/version.h
#	generators/poppler/libokularGenerator_poppler.desktop
#	generators/txt/libokularGenerator_txt.desktop
#	generators/xps/libokularGenerator_xps.desktop
#	ui/annotationwidgets.cpp
#	ui/presentationwidget.cpp
2016-02-22 03:50:54 -08:00
Albert Astals Cid
c8f52a2795 Merge remote-tracking branch 'origin/Applications/15.12' 2016-02-08 00:28:09 +01:00
Albert Astals Cid
41006445a9 setAttribute with doubles is evil as it uses the current locale and we don't want that, use QString::number
BUGS: 359016
2016-02-08 00:27:06 +01:00
Oliver Sander
e5383ea2d6 Set objectName for 'm_name'
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
2015-11-27 19:50:10 +01:00
Sumit Sahrawat
3400f76dad Make inline annotation border width customizable, using a spin widget to accept input
REVIEW: 125801
BUGS: 332887
2015-11-24 01:10:46 +01:00
Montel Laurent
466eb79615 Use QStringLiteral 2015-10-29 13:37:11 +01:00
Albert Astals Cid
8445660539 Merge remote-tracking branch 'origin/master' into frameworks 2015-10-18 22:29:00 +02:00
Albert Astals Cid
d52a07c9d2 Merge remote-tracking branch 'origin/gsoc2015_layer_feature' 2015-09-16 22:54:42 +02:00
Albert Astals Cid
a475a7570c Merge remote-tracking branch 'origin/Applications/15.08' 2015-09-13 16:42:28 +02:00
Frederic Tronel
4fee5131e9 Do not --use when invoking kate anymore
BUGS: 352657
2015-09-13 16:41:09 +02:00
Montel Laurent
c3decc55f7 Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	CMakeLists.txt
	ui/pageview.cpp
2015-08-27 23:04:28 +02:00
Jake Linder
172d78c6b3 Add "Trim To Selection" feature
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
2015-08-27 22:09:02 +02:00
Michael Palimaka
2a7fda155b Use correct target name. 2015-08-25 03:57:27 +10:00
Albert Astals Cid
d8f9800d28 Make the drawing tools be actions instead of tool buttons
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
2015-08-22 22:17:40 +02:00
Tobias Koenig
81f80ac3a4 Implement drawing quick selection tool for presentation mode
REVIEW: 124687
2015-08-22 22:17:40 +02:00
Montel Laurent
014b712359 Use explicit. Q_DECL_OVERRIDE 2015-08-18 15:27:20 +02:00
Montel Laurent
6fab218de9 Use Q_NULLPTR 2015-08-18 15:12:07 +02:00
Montel Laurent
3102cd8665 Add explicit 2015-08-04 14:20:30 +02:00
Montel Laurent
70159dc61f Add ';' 2015-08-03 10:26:04 +02:00
Montel Laurent
49ce3fc4d2 Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	core/version.h
2015-08-03 09:44:50 +02:00
Saheb Preet Singh
48905cf16b Support Fade transition in presentation mode
REVIEW: 115532
BUGS: 317073
2015-07-17 01:02:07 +02:00
Saheb Preet Singh
261baa28b9 added separate search options for the layers feature 2015-07-12 21:15:27 +05:30
Albert Astals Cid
69afbeeee2 Multiply by ~10 the memory values
Since we did something similar for the maximum per request value
2015-07-10 00:06:11 +02:00
Montel Laurent
3580f0089b Fix includes 2015-03-17 09:06:01 +01:00
Jeremy Whiting
61554c833e Reenabled text to speech using QtSpeech as an optional dependency.
If QtSpeech (dev branch) is built and installed this builds and works
very well.
REVIEW:122553
2015-02-23 12:24:44 -07:00
Montel Laurent
c4f224f1e8 Port to new connect api 2015-01-30 22:06:53 +01:00
Montel Laurent
5da7c5f77d port to qCDebug. Autogenerate export headers 2014-10-27 22:35:06 +01:00
Montel Laurent
2910f82a04 Port to QSpinBox 2014-10-19 15:19:00 +02:00
Montel Laurent
16f13c04d2 kdelibs4support-- 2014-10-17 23:30:54 +02:00
Montel Laurent
3b4ee788b8 Fix includes 2014-10-08 13:37:04 +02:00