Page MenuHomeSolus

TexWorks colours in dark mode
Closed, InvalidPublic

Description

TexWorks seems to recognize dark mode and switch accordingly (changing the theme in Budgie desktop settings flips the colors in TexWorks application).

Unfortunately, key font colors are practically illegible making it impossible to use in dark mode:

I searched a bit on how to do this and found that there is something called Qt stylesheets that allow you to control the appearance. I am not sure if these are already used by Solus or not, or even whether this would be something that needs action by the package maintainer or something more core in Solus that deals with all Qt applications in general.

Is there any chance that its integration can be improved so that it can be used with dark themes in Solus?

Thank you

Event Timeline

karypid created this task.Mar 24 2020, 8:25 PM
Girtablulu triaged this task as Needs More Info priority.Mar 25 2020, 8:59 AM
Girtablulu edited projects, added Software; removed Lacks Project.
Girtablulu added a subscriber: Girtablulu.

QT Stylesheets has nothing to do with it, I checked it on my Plasma install and it works totally fine, the package.yml pulls in any needed QT stuff mentioned inside the CMakeKists. So I guess it's more of a Plata-Theme issue.

Can you try it out with a different dark theme?

algent added a subscriber: algent.EditedMar 25 2020, 12:01 PM

I just installed texworks 0.6.2, 0.6.3 and 0.6.4. The colors in dark mode are same, nothing changed.
Using different themes, you can notice that some are more darker than others. So for now, I think you just have to find a good theme for it.

I've installed various themes by searching for "gtk-theme" in the software center.

The only one that is marginally acceptable is "Adapta-Nokto-Eta" and that's because its background is not too dark.

I think the problem with ALL the themes is that they only change the background and the UI controls, but the seem to not touch the font colors. All the themes seem to never make the font colors brighter.

Is this a limitation of theming or is it just an omission? Should I maybe file a task against a theme (e.g. Plata-Noir) and ask if they are able to control font colors at all?

Girtablulu raised the priority of this task from Needs More Info to Needs Triage.Mar 25 2020, 2:18 PM

So I checked it source-code, there is a file to edit the coloring. They have once size fits all.

you can find the file under ~/.Texworks/configuration/syntax-patterns.txt, there you can change your coloring stuff.

What could be done, is requesting upstream (Texworks) a syntaxfile for light- and darktheme and not just one because I don't see why we should go through the trouble patching this if it could be solved upstream for everyone but I let core have the last word to this

Do you by any chance have a link to the source code where you checked? I will try to raise an issue in TeXworks for this so would like to provide as much context as possible.

In the meantime I'll stick to "less dark" themes and also try to tinker with the configuration in syntax-patterns.txt.

Thank you so much for this. Really appreciate your help even though it's not a Solus/packaging issue.

Would change status but not sure what is appropriate for this case. Invalid status maybe as it is not applicable to Solus?

I have been able to switch back to Plata-Noir-Compact after editing the file you pointed out (~/.Texworks/configuration/syntax-patterns.txt) to use lighter colous. (Basically I replaced darkred with salmon, darkblue with dodgerblue and darkgreen with green).

It is evident that since the highlighting colors are not picked up from a "them palete", this cannot be done from the theming side of things.

It would be nice there was some 'standard' way for the desktop to inform applications whether they are dealing with a dark or light theme, so that they may themselves come with two sets of defaults for stuff like syntax-highlighting, but that is a totally different issue.

Thank you for your help!