lmms icon indicating copy to clipboard operation
lmms copied to clipboard

Allow theming of elements with hardcoded color values

Open thismoon opened this issue 1 year ago • 6 comments

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):

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

  1. modify the values of theme's style.css
  2. set the theme directory in the LMMS settings
  3. some elements aren't themed

Screenshots / Minimum Reproducible Project

image

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.

thismoon avatar Jun 05 '24 20:06 thismoon

It has some theming here: https://github.com/LMMS/lmms/blob/master/data/themes/default/style.css#L990

zonkmachine avatar Jun 10 '24 19:06 zonkmachine

Related: https://github.com/LMMS/lmms/issues/1839

zonkmachine avatar Jun 10 '24 19:06 zonkmachine

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).

zonkmachine avatar Jun 11 '24 13:06 zonkmachine

The three posts above that I haven't crossed out as already fixed, is implemented in https://github.com/LMMS/lmms/pull/7314.

zonkmachine avatar Jun 11 '24 14:06 zonkmachine

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.

zonkmachine avatar Jun 11 '24 19:06 zonkmachine

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)) image

RustoMCSpit avatar Jun 25 '24 13:06 RustoMCSpit

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)) image

@Rossmaxx ?

RustoMCSpit avatar Nov 30 '24 14:11 RustoMCSpit

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.

Rossmaxx avatar Nov 30 '24 14:11 Rossmaxx

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)

Rossmaxx avatar Nov 30 '24 14:11 Rossmaxx

Ahh it seems the issue got linked wrongly to the PR which I merged minutes ago.

Rossmaxx avatar Nov 30 '24 14:11 Rossmaxx

Ahh, I'm confused. The issue linkage is correct. Your request deserves a seperate ticket.

Rossmaxx avatar Nov 30 '24 14:11 Rossmaxx

Ahh, I'm confused. The issue linkage is correct. Your request deserves a seperate ticket.

but it's a ui element being colored?

RustoMCSpit avatar Nov 30 '24 14:11 RustoMCSpit