Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic dark theme support (Windows 10) #630

Merged
merged 1 commit into from Sep 10, 2019
Merged

Conversation

worstje
Copy link
Contributor

@worstje worstje commented Sep 6, 2019

Windows 10 has supported a 'dark theme' option for a while, and the fact
Manuskript is like looking into a bastion of bright white while using it
is bothersome to say the least.

Since this is a setting defined as the OS level, I believe this should
be something Manuskript automatically adjusts itself to match, thus the
lack of a configurable setting on the Manuskript end.

Note that it does not adjust the main editor area since that is already user configurable.

For as far I have been able to check, it works with every builtin theme that is selectable in the Settings screen and produces legible output. (I would not go as far as to call it pretty, simply because most of them aren't pretty to begin with. 馃槈 )

I looked into Linux-land for a little while to not make this a Win10-only commit, but there is no separate 'dark theme' switch on Ubuntu at least. And even then there is the mess between Gnome and Qt themes to worry about, which means dragging in a whole new library of which I have already forgotten the name and compiling against that... suffice to say I'll leave any such challenges to the people who improving the themes-related situation on Linux. 馃槃 )

Windows 10 has supported a 'dark theme' option for a while, and the fact
Manuskript is like looking into a bastion of bright white while using it
is bothersome to say the least.

Since this is a setting defined as the OS level, I believe this should
be something Manuskript automatically adjusts itself to match, thus the
lack of a configurable setting on the Manuskript end.
@worstje
Copy link
Contributor Author

worstje commented Sep 6, 2019

I had cleaned up my comments before sending in the PR, but had forgotten to add the changed source file when amending the original commit, so they weren't actually registered. Whoops.

Btw, for good measure, have a screenshot of what it looks on my end with the dark theme patch enabled: (ignore the testing data that I used for the other PR; I didn't realize that one was showing!)

manuskript-dark-theme

(The editor area that by default has a white background has been manually adjusted to have a dark background.)

@gedakc
Copy link
Collaborator

gedakc commented Sep 9, 2019

I performed regression testing on this PR and no adverse issues were discovered with the following:

  • Kubuntu 16.04
  • Kubuntu 19.04
  • Windows 7
  • Windows XP

Further the K Desktop Environment Breeze and Breeze Dark themes continued to work as expected.

Manusrkipt on Kubuntu 19.04 with Breeze theme
Manuskript-Kubuntu1904-Breeze-Theme

Manuskript on Kubuntu 19.04 with Breeze Dark theme
(Note that Text Editor settings were not modified in Manuskript settings which is a user controllable feature in Manuskript already)
Manuskript-Kubuntu1904-Breeze-Dark-Theme

Hence this PR looks good to me.

If no concerns are raised then I plan to merge this PR with the develop branch in the next day or so.

@worstje
Copy link
Contributor Author

worstje commented Sep 9, 2019

I always assumed that KDE-based distros would work out of the box because they use Qt under the hood.. and it seems they do. 馃憤 It is nice to see that the dark theme patch for Windows resembles that Breeze Dark theme for KDE to such a high degree!

FYI: This patch has a platform check for Windows, and then checks a registry entry that should only exist on a Windows version that supports the 'dark theme' toggle.. so if we had any sort of regression on any other OS, there would have been some really funky business going on. 馃ぃ

Having seen your screenshots, I am all happy with it!

@gedakc
Copy link
Collaborator

gedakc commented Sep 10, 2019

Great work @worstje. I'll bet that this enhancement will make many Windows 10 users happy. We've had many votes for dark theme as can be seen in issue #388.

I will merge this PR with develop for inclusion in the next release of Manuskript.

Would you update the How to Enable Dark Theme Wiki entry for Windows 10?

Thanks,
Curtis

@gedakc gedakc merged commit 860ada2 into olivierkes:develop Sep 10, 2019
@gedakc gedakc added this to the 0.10.0 milestone Sep 10, 2019
@worstje
Copy link
Contributor Author

worstje commented Sep 10, 2019

Done. 馃憤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants