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

Allow theming of elements with hardcoded color values #7306

Open
1 task done
thismoon opened this issue Jun 5, 2024 · 6 comments · May be fixed by #7314
Open
1 task done

Allow theming of elements with hardcoded color values #7306

thismoon opened this issue Jun 5, 2024 · 6 comments · May be fixed by #7314
Assignees

Comments

@thismoon
Copy link

thismoon commented Jun 5, 2024

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.

  • I have searched all existing issues and confirmed that this is not a duplicate.
@thismoon thismoon added the bug label Jun 5, 2024
@zonkmachine
Copy link
Member

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

@zonkmachine
Copy link
Member

Related: #1839

@zonkmachine zonkmachine self-assigned this Jun 10, 2024
@zonkmachine
Copy link
Member

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

@zonkmachine zonkmachine linked a pull request Jun 11, 2024 that will close this issue
@zonkmachine
Copy link
Member

The three posts above that I haven't crossed out as already fixed, is implemented in #7314.

@zonkmachine
Copy link
Member

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.

@RustoMCSpit
Copy link

RustoMCSpit commented Jun 25, 2024

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

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

Successfully merging a pull request may close this issue.

3 participants