lmms
lmms copied to clipboard
Allow theming of elements with hardcoded color values
LMMS Version(s)
LMMS 1.3.0-alpha.1.617+g948bb4ac6
Bug Summary
Some elements in LMMS have hardcoded color values rather than using colors from the theme's style.css file. this makes it impossible for the user to change the color of these elements using themes
Expected Behaviour
Changing the colors of UI elements should be possible by modifying their classes in the style.css file. but there's no values to be changed for some elements. the colors of these elements are hardcoded in the source code instead of being taken from the style.css file, therefore making it impossible for regular users to theme.
Here are the elements that I found to be impossible to theme because of this (with the location of the hardcoded color value):
- The envelope graph
- The LFO graph
- ~~The label of the LCD widget~~ See comment.
- The current step note
- ~~The slicerT instrument (other instruments have their colors in style.css)~~ See comment.
There are other hardcoded colors but i'm not sure if they should become themable too (e.g. spectrum analyser, vectorscope...)
Here's an example of a non hardcoded color that gets it's value from style.css: the knob's "lineInactiveColor" (style.css "qproperty-lineInactiveColor")
I think these pages are relevant: Qt documentation: The Property System, Qt documentation: The Style Sheet Syntax
Steps To Reproduce
- modify the values of theme's
style.css - set the theme directory in the LMMS settings
- some elements aren't themed
Screenshots / Minimum Reproducible Project
Please search the issue tracker for existing bug reports before submitting your own.
- [X] I have searched all existing issues and confirmed that this is not a duplicate.
- The slicerT instrument (other instruments have their colors in style.css)
It has some theming here: https://github.com/LMMS/lmms/blob/master/data/themes/default/style.css#L990
Related: https://github.com/LMMS/lmms/issues/1839
As I understand it, this was implemented in https://github.com/LMMS/lmms/pull/2716 The code you linked to is the initialization part that will give default values if the theme doesn't provide a color for this variable (such as an older theme).
The three posts above that I haven't crossed out as already fixed, is implemented in https://github.com/LMMS/lmms/pull/7314.
As I understand it, this was implemented in #2716 The code you linked to is the initialization part that will give default values if the theme doesn't provide a color for this variable (such as an older theme).
Although I'm failing to actually change color of the knob/lcd labels.
is it possible to change different pitch values in the piano roll to be different colors (and have that vary when the piano roll is showing the chromatic scale vs when the user selects a scale to show the colors based off of solfege (assuming you can select scales in LMMS))
is it possible to change different pitch values in the piano roll to be different colors (and have that vary when the piano roll is showing the chromatic scale vs when the user selects a scale to show the colors based off of solfege (assuming you can select scales in LMMS))
@Rossmaxx ?
I don't think that's possible. We can't even colour piano roll notes afaik. Or even if it's possible, haven't used it.
Wait a minute, looks like something @LostRobotMusic did in his personal build, but that's not publicly available. (Lost I'm telling this from memory, don't bash me if I'm wrong)
Ahh it seems the issue got linked wrongly to the PR which I merged minutes ago.
Ahh, I'm confused. The issue linkage is correct. Your request deserves a seperate ticket.
Ahh, I'm confused. The issue linkage is correct. Your request deserves a seperate ticket.
but it's a ui element being colored?
