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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a dark theme for the score #286

Closed
cameronwhite opened this issue May 27, 2020 · 5 comments
Closed

Implement a dark theme for the score #286

cameronwhite opened this issue May 27, 2020 · 5 comments

Comments

@cameronwhite
Copy link
Member

Related to #284 (which was resolved by always using a white background), it would be nice to support a dark theme for the score view.

@mostafa-nabil
Copy link
Contributor

hello, I have checked #284, and I think #286 is more of a generic feature for all OSs, not just just an issue for OSX like the previous bug, as mentioned in the label. Is that true or did I misunderstand something?
I would like to work on this feature. Are there certain colors to stick to for the score dark theme? And is there a preferred place to add the dark-theme-enabling option?

@cameronwhite
Copy link
Member Author

This would be great to have someone work on!

My original thinking was to follow the application's color palette (https://doc.qt.io/qt-5/qguiapplication.html#palette) which https://doc.qt.io/qt-5/qpalette.html recommends using, since that would follow whatever the default color scheme is from the user's environment. The score uses some additional color shades, so it might need to use something like QColor::darker() to compute the additional shades relative to the background / foreground color.
That also would hopefully mean that the print functionality would use the correct style (white background) even if the user has a dark theme.

I don't know for sure if this is the best approach, but I think it's at least a good start to identify and fix all the hardcoded colours in the score rendering code. The ScoreArea class is the containing widget to start from (e.g. 99bdeb3 changed its background colour), but most of the work occurs in the SystemRenderer class and other files in the source/painters directory. Definitely let me know if you have any questions!

@cameronwhite
Copy link
Member Author

A related bug I noticed is that time signatures and key signatures are not visible in the OSX dark mode, because they are drawn with white text (probably inheriting the default theme) over a white background, instead of switching to dark text.

@mostafa-nabil
Copy link
Contributor

@cameronwhite
I think we would need white note images to use them to use them in dark mode, what do you think?
There would only be a small challenge of knowing whether the theme used by the system is dark or not.

@cameronwhite
Copy link
Member Author

The music notes are all drawn from a font, so I think it's just a matter of choosing the right text colour when they're drawn (hopefully!)

mostafa-nabil added a commit to mostafa-nabil/powertabeditor that referenced this issue Jun 7, 2020
…er (tabs) are now dependent on system default colors/theme using Qpalette

* Changes tested on Ubuntu using Adwaita and Adwaita-dark themes

powertab#286
mostafa-nabil added a commit to mostafa-nabil/powertabeditor that referenced this issue Jun 12, 2020
…alette of the system

* Printing with default palette needs to be implemented

powertab#286
mostafa-nabil added a commit to mostafa-nabil/powertabeditor that referenced this issue Jun 17, 2020
…the default colors

* minor refactoring

* scoreArea background color changed to be Light instead of Backroung color (in light theme, Background is light grey)

powertab#286
mostafa-nabil added a commit to mostafa-nabil/powertabeditor that referenced this issue Jun 17, 2020
@cameronwhite cameronwhite added this to the Alpha 13 milestone Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants