Repository navigation
Improve legibility of text esp. in screenshots. - #5113
Conversation
found: - HTML font tag is 20 years deprecated. use style attributes instead. - background color can only be set by a div/span combination, - table font color 'inherit' does not work
|
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
This is an automatically generated QA checklist based on modified files. |
|
Hello @gzotti! Thank you for the suggested improvement. |
- override colors not forwarded yet.
They only reimplemented the base implementation.
|
I face a problem in that text color attributes are swallowed by Qt's rendering of HTML tables. These need dedicated CSS attributes color and (where needed) background-color, so the colors will be set several times. |
|
Why do you even define the style inline when you could define a bunch of classes in a separate CSS file and give the elements the class name? E.g. instead of <table style='margin:0em 0em 0em -0.125em;border-spacing:0px;border:0px;color:%1;'>you'd use <table class='info-string'>and have this in the common CSS: .info-string {
margin: 0em 0em 0em -0.125em;
border-spacing: 0px;
border: 0px;
color: #YOURCOLOR;
} |
|
Thanks. The inline CSS was already here, so I just expanded it. I am actually not familiar with interacting with external CSS: The YOURCOLOR will have to change during infostring generation/before display. How would I set this? In addition, the HTML surrounding the tables also needs the color/background. (This is now done by the span element) |
|
Looks like you can set the style sheet for As for |
Color in named elements work. Unclassified text still has no color. Back to wrapping in font tags?
What kind of text? Something out of any tags? Maybe you could wrap such text in |
|
Yes, I reactivated the div class=.... However, the background-color is not used. Apart from that it seems to work now. |
- also deactivated unused css elements for now - it seems background-color is still not working outside tables.
|
I hope copying data via clipboard is still alive? |
Of course. I tested both types, HTML in LibreOffice and plaintext in a text editor. |
|
Any more comments/additions? |
I have seen it. But I have no idea what to do here. The requested-for application of this manual-only setting is to create more legible screenshots at night, i.e., to cover stars and other sky elements in the text area. For daylight screenshots, you must obviously use "override text color" and set a daylight color other than black. I don't fight any 'black on black' situation the user can mitigate. The daylight application (negative opacity) is ugly to begin with and I don't know if anybody ever would use it (It may help visually impaired, though), but was easy to add. |
Interesting hack. But it's a new hack, not what I call elegant. |
I think the header takes the whole width regardless of rtl/ltr settings. The styled span inside the header (with unstyled header) should fix it, though I didn't check.
It's a matter of completeness of the feature. |
|
I played around with defining spans inside the Planet::getInfoLabel() and other attempts that could have helped assuming the rtl/ltr cause. Seems not to help. But I also saw how broken the whole InfoString looks in Arab! At this point I declare the long dark title bar a feature. Currently this PR feature has one user. |
|
With the latest commit? |
|
Tested with 015e1c6. Before it there was no such issue. |
|
Alright, my daylight color is yellow, yours is black. Now I hope your OverwriteColor is not black. |
The question is not what "my" colors are, but rather what the defaults are. I don't remember to have changed colors. At least, with the latest commit things seem to look OK. |
|
Dear @gzotti. This feature is really amazing. I have tried it, but it is not working for the legend. When I click the general body like planets, or stars, those are fine. But not with the legend. Here is from my screenshot |
|
Uh, OK. I should probably add a span style somewhere, Qt is quite picky about which HTML is affected by CSS. Sorry, will be in 26.4 (or earlier beta). |
|
Thank you |
- needed for constellation legends





Description
@sushoff asked me to investigate options for clearer screenshot printing.
Here are attempts to add additional darkness behind the Infotext.
found:
Ideas:
This needs some care also with our Infotext postprocessing etc.
Fixes # (issue)
Screenshots (if appropriate):
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: