I'll make a PR then.
[Issue] Multiline Textfield with Dark Themes
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- wandererfan
- Veteran
- Posts: 6268
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: [Issue] Multiline Textfield with Dark Themes
- wandererfan
- Veteran
- Posts: 6268
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: [Issue] Multiline Textfield with Dark Themes
@MisterMaker , @balrobs
Are we ok that this doesn't respect the stylesheet's settings? I don't know a way to get the selection colour from the stylesheet instead of the palette.
Are we ok that this doesn't respect the stylesheet's settings? I don't know a way to get the selection colour from the stylesheet instead of the palette.
- Attachments
-
- propertyList_nostylesheet.png (214.82 KiB) Viewed 1470 times
-
- propertyList_lightgreen.png (206.96 KiB) Viewed 1470 times
-
- propertyList_darkorange.png (195.48 KiB) Viewed 1470 times
Re: [Issue] Multiline Textfield with Dark Themes
From my point of view it‘s already a big improvement so I would vote for it … but let‘s hear also @MisterMaker‘s opinion.wandererfan wrote: ↑Wed Aug 03, 2022 3:57 pm
Are we ok that this doesn't respect the stylesheet's settings? I don't know a way to get the selection colour from the stylesheet instead of the palette.
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: [Issue] Multiline Textfield with Dark Themes
Can't you just skip specifically assigning a color? I believe with that you are overriding the stylesheet that would have otherwise been auto applied.
Re: [Issue] Multiline Textfield with Dark Themes
I agree, I think by not assigning it directly in the code it will default to the style settings for that type of widget as defined in the stylesheet.adrianinsaval wrote: ↑Wed Aug 03, 2022 7:01 pm Can't you just skip specifically assigning a color? I believe with that you are overriding the stylesheet that would have otherwise been auto applied.
- wandererfan
- Veteran
- Posts: 6268
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: [Issue] Multiline Textfield with Dark Themes
I tried that. If I just remove the setting of the colours, then the selection isn't highlighted at all, even if there is no stylesheet in effect. The colours aren't set on a widget, but on a QTextCharFormat.obelisk79 wrote: ↑Wed Aug 03, 2022 7:41 pmI agree, I think by not assigning it directly in the code it will default to the style settings for that type of widget as defined in the stylesheet.adrianinsaval wrote: ↑Wed Aug 03, 2022 7:01 pm Can't you just skip specifically assigning a color? I believe with that you are overriding the stylesheet that would have otherwise been auto applied.
- Attachments
-
- noAttributesSet_darkorange.png (195.23 KiB) Viewed 1364 times
Re: [Issue] Multiline Textfield with Dark Themes
I'm not trying to sound difficult here, but is the line highlighting even necessary? It seems the rest of the window follows the stylesheet without it, and if there's a blinking cursor to indicate where you're typing, it seems kind of superfluous to have the highlight. This would alleviate any future complaints regarding styling with negligible potential downsides as far as I can tell.
Re: [Issue] Multiline Textfield with Dark Themes
I think that giving up the highlighting feature would cause troubles to many users.
Imagine the case a user selects all words in a single line. The visual feedback would be a blinking coursor at the end of the line. So pressing DEL he could expect to delete only the last letter of that line.
Hope my thinking makes sense.
Cheers
Imagine the case a user selects all words in a single line. The visual feedback would be a blinking coursor at the end of the line. So pressing DEL he could expect to delete only the last letter of that line.
Hope my thinking makes sense.
Cheers
- wandererfan
- Veteran
- Posts: 6268
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
- adrianinsaval
- Veteran
- Posts: 5541
- Joined: Thu Apr 05, 2018 5:15 pm
Re: [Issue] Multiline Textfield with Dark Themes
In that case why are we using a QTextEdit widget and not an editable QListWidget?