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

Closed
1 task done
thismoon opened this issue Jun 5, 2024 · 12 comments · Fixed by #7314
Closed
1 task done

Allow theming of elements with hardcoded color values #7306

thismoon opened this issue Jun 5, 2024 · 12 comments · 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
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

@RustoMCSpit
Copy link

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 ?

@Rossmaxx
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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

@Rossmaxx Rossmaxx reopened this Nov 30, 2024
@Rossmaxx
Copy link
Contributor

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

@RustoMCSpit
Copy link

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

but it's a ui element being colored?

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.

4 participants