Details
-
Task
-
Resolution: Done
-
Not Evaluated
-
None
-
None
-
None
Description
We need to get rid of hard-coded colors used for rendering link decorations, text selections, the search results on the page, and the current search result during navigation of those.
Since users will presumably tend to use Controls 2 for the chrome (the rest of the UI around the PDF viewer), the PDF view should ideally inherit the colors from the theme in use, somehow. I.e. text selections should be highlighted the same way they would be in a TextArea; maybe we can use the accent color for search results, or something like that. Maybe the current search result should replace the selection when you are iterating: that way it will be easy to copy the text that was found, and remove the need to distinguish the selection from the search result visually. The links should somehow be highlighted with QPalette::link color somehow; but SystemPalette in QtQuick does not have the link color available (that's another bug IMO).
That gets me thinking: after https://codereview.qt-project.org/c/qt/qtdeclarative/+/270092 , maybe ApplicationWindow can automatically set the colors in its own contentItem's palette based on the theme in use, and then non-Control items inside will be able to access those colors via the Item.palette. And the user will have full control of the colors via the controls .conf file.
Attachments
Issue Links
- depends on
-
QTBUG-82925 make QPalette extensible to support more color roles
- Reported
- is required for
-
QTBUG-77503 Prepare for a supported release of QtPDF with more features
- Closed
- relates to
-
QTBUG-53189 SystemPalette should expose Link and LinkVisited colors
- Reported
-
QTBUG-109519 Add accent color support to QPalette
- Closed