-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copying highlighted text with automataic color respects automatic color, but perhaps this shouldn't be the case #13
Comments
This one's going to be a little complicated to debug. The issue has to do with the formatting contained in the copied text and how QPrompt interprets that formatting. To debug this, I've created a tool that allows me to visualize the formatting metadata in copied text. Then I look for markers in that data to use in filtering rules that take care of issues like this one, while preserving most of the formatting. I haven't yet setup a pipeline for building this tool on macOS, but I'll do that and then we'll be able to read what formatting is in the text being copied and fix the issue. |
@HeroicMeaning Sorry that it took me this long to test this. I couldn't get my clipboard inspection app to work reliably on macOS. It's working good enough now to make these tests myself, so I just got a trial for Office 365 for Mac. After replicating your issue, I can say for sure that the text color follows QPrompt's intended behavior. The highlight is also behaving as intended. The color representations being copied from Word correspond to the colors to be used when printing the document, and not the colors that are visible on screen. I realize that by QPrompt not replacing the highlight colors with lower contrast versions, these can result in text that's inconvenient to read. I'll look into ways to modify or represent the imported highlights to improve readability. |
Quoting key notes from #290: "Automatically changing the default text color after a highlight color has been set" is a quality of life feature implemented by Microsoft Office and other office suites no more than a decade ago. When highlighted text is copied, QPrompt only receives the metadata from the highlight, there's no data on text color coming-in because that is technically still the default. For the color to match, QPrompt would have to match the logic from those programs, which would in turn make it not match the logic of other programs, such as web browsers. That however shouldn't be an issue, for we can look at import metadata to tell when the text comes from a document and treat that text differently. Nevertheless, the more complex the logic is, the harder it can be to maintain. For that reason I'd like to keep this logic as simple as possible. The best we can do is try to replicate the behavior from Microsoft Office and LibreOffice. That is, we should treat the text-color metadata as non-existent and store only highlight information, but treat that highlight information as something that affects both color and highlight. I'm honestly not sure of how to program this, but that is how the logic should go to match the office suites and what would produce the behavior users expect." |
Bug Description
Cutting and pasting highlighted text gives unpleasant results in dark mode
Steps to Reproduce
Expected behavior
the highlights look similar
Actual Behavior
the highlight is the normal highlight color - however, because qprompt is in dark mode, the text is white, rather than black, so the highlight washes the text out. see pic
I don't know if this an ms word thing, or more general.
Detailed description of display configuration (if applicable)
...
Screenshots (if applicable)
https://www.dropbox.com/s/d6kx0ch437r6gis/Screen%20Shot%202021-09-19%20at%203.15.53%20PM.png?dl=0
Device information
Additional context
...
The text was updated successfully, but these errors were encountered: