Replace system highlight color with customized background color.
Currently, Okular uses the QPalette::Highlight in the QPalette::Active group as the text selection background color and there is no way to change it. However, in many themes this color is not intended to be used in highlighting PDF texts, because it assumes the highlighted text will be automatically color-inverted (e.g. from black to white). At the same time, inverting the text color in the selection area is generally not available in any PDF reader.
Therefore, Okular should use another background color for text selection area. In this merge request, I tentatively use QColor(204, 204, 255)
, which is the default background color used by Mozilla Firefox PDF reader.
I will be happy to take suggestions if anybody suggests we should use another default color, or we should implement a user-configurable option for the text selection background color (e.g. in the user accessibility).
Please let me know what you think, thank you very much!