Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-82540

Make PDF views stylable

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Not Evaluated
    • None
    • None
    • PDF
    • 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

          For Gerrit Dashboard: QTBUG-82540
          # Subject Branch Project Status CR V

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change