-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Settings buttons' background not themeable. #1806
Comments
These are of type For starters you could try styling Not sure if that helps. This is where I found the code and traversed through the classes from there... |
@tresf neither QPushButton nor TabButton are present in styles.css. I
assume this means they are not styleable at the moment? I'm discovering
various issues with styling lmms/themes as I try to make a theme, but I'm
not sure creating a new issue for each one is correct. Should I instead use
one master issue? I could edit this one if/when I find more perhaps.
|
Have you tried adding them? :) QPushButton {
background-color: rgb(255, 0, 0);
}
Yes, we are well aware. Keep up the good work. 👍
Whatever works. The more we have these conversations, the less you should need help locating the place to change this stuff... :) |
@Spekular If you find a case where a widget style is too generic for your purposes, let us know that we can take a look and change the code to use specific classes. |
@tresf then I shall! These buttons could definitely use separate colors
|
It's just classic style sheeting. You can style the parent, LMMS is very similar. The styles cascade downward so they inherit their parent style unless we override them. If they aren't specified, they take defaults. Styling is as granular as you'd like it and it is a coordinated effort between stylers and coders that makes a good theme possible. 👍 |
Until we have more people trying to theme our software, we don't know how granular people want to get. IIRC, QButton can style all of that stuff, so that is likely the point you are missing -- we may already have that part themed, but at a global level.
Ok... I'm not sure if that is a question that needs helps or not... 😕
We don't.. that's why we're here to answer your questions! |
@tresf I'd like to set the entire song label to one color but I'm not sure
if it's possible and if so what element I should modify. If it's possible I
want to know how, if not I want it to be possible ;) How exactly do you go
about finding out how to theme certain elements? My strategy has been
github search + digging around in the files I'd expect it to be in, but I'm
not entirely sure what I'm looking for so it hasn't been very fruitful so
far. On the bright side, most things have been very easy to change.
|
Alright, I must have missed the part where the buttons are added in
SetupDialog.cpp, but now that I see that, I can follow how you get to
TabButton and QPushButton. I didn't see the connection to QPushButton at
first before I remembered about header files (I guess I ought to have
figured out the point of header files by now but nope. Still seems easier
with just one class file. Or maybe java has an equivalent that I haven't
dealt with). At no point along the line did I see
setThisButtonsColorTo(getColorFromStylesheet()), which throws me off a bit.
In fact I didn't even see setThisButtonsColorTo() anywhere, perhaps I was
scrolling too fast and blinked at the wrong time.
|
It is here: :) Yeah, this is going to get tricky... I think we have quite a few widgets which aren't accessible via the style.css because of how they are initialized. This is where @badosu said we'll have to help out. This could be your calling... we may finally have good themability!! trackOperationsWidget, trackLabelButton {
background-color: rgb(255, 0, 0);
} -Tres |
Also, warning that theming |
@Spekular Also, besides providing access to themeability of some widgets that are not possible today, we may granularize widgets classes to provide for specific themeing needs. Just open an issue whenever you find one of these cases. |
I think I agree... We'll be inundated fast though... There are a ton of these cases from my testing today. |
Oh, I thought the plan was to wait with break theming backwardscompatibility for LMMS2? |
As far as I'm concerned, every single version breaks theme backwards compatibility. Expect this for years to come, unfortunately.... Just the nature of re-factoring and cleaning up code. If you're interested in shimming in backward-compat code for themes, we can cross that bridge as well, but IMO this isn't new with 1.1 or 1.2 so shouldn't really come as a surprise:+1: |
It does come as a surprise when I am pretty sure Vesa and others have waited with putting code into 1.2 and instead targeted master because of that plan. However I am perfectly fine with it :) So if you are going to break backwardscompat you could probably include a lot of the changes in master branch regarding theming too, I mean why wait? OFF TOPIC: We should label themes (on lsp) with version too, btw, cause the majority of them cannot be used unless you run really old LMMS versions |
Who is "you"? Every release has broken this. I'm not sure what part of my post isn't clear. 0.4.15 themes don't work on 1.0.0. 1.0.0 themes don't work on 1.1.0. What is different for 1.2.0 then? To give you some background on the decision, Vesa originally wanted the major re-factoring to happen at the 2.0 stage, but Lukas re-factored anyways. I'm very grateful he did because we need to keep moving forward with this software (and the inconsistent naming was very hard to follow). The 2.0 milestone was created by Vesa for some very large impacting changes and IMO it would be irresponsible of us to make all of them at once. The rate we're progressing at right now has a lot of momentum and I feel the 1.2.0 milestone to be at a happy place between staying with 1.1 forever and moving all of our eggs to the 2.0 basket. 1.2.0 is exactly where it should be I feel and re-factoring is part of that milestone. But your comment about breaking themes... If you want to take the time to fix a 1.1.0 theme to ALSO work with 1.2.0, now is the time (yes it is technically possible to do this in pure CSS and pngs), but that is a responsibility of the 3rd party themers for now (sorry!). We can't guarantee compatibility between versions until we make theming more comprehensive (a goal that Specular, Cusis, Rebecca are helping us understand). We also need to settle on permanent names for things.. and there's just too much good happening now to put a pause on small incremental changes for a 3rd party skin that a small percentage of our users use. -Tres |
Ok, so I missed out on that Lucas re-factored anyways. |
312 files affected. It's a monster... #1353 Here's Vesa's comments
|
Backwards compat for themes is almost impossible to provide since there will always be new things in new versions that didn't exist in old versions that now have to be themed. So backwards compat for themes will likely break in every new release, like Tres said. LMMS 2.0 would break compat in more than just themes though, it's a completely different level of breakage. |
Alright @tresf I can theme the settings buttons with SettingsDialog >
QPushButton.
It seems that (as you've showed) all the issues I've had are just a matter
of finding the name of the element, so what should I be suggesting?
Do I suggest which areas should be in the file from the start? Do I need to
look for areas that can't be themed at all?
The track labels I haven't figured out yet, but it's probably just a matter
of finding the right parts to theme, again. I think track labels should be
in the default theme file and themeable as a whole (rather than in parts)
for convenience, since it's something you're likely to want to change,
especially if you change editor colors. Perhaps the different track labels
could inherit from one color? I wouldn't ve surprised if they do but I
haven't found it yet.
|
Yeah, we need a better way to do it. I think we have many GUI elements simply unreachable by CSS. For starters, you can add https://github.com/LMMS/lmms/blob/master/src/gui/MainWindow.cpp#L178 Once you are comfortable with doing that, we can decide on a permanent solution. I'm just hesitant to decide on a direction without some feedback from the other core developers. 👍 |
good stuf here finally a Q :
Where have you these 'them' from |
@musikBear if you're interested in helping with this, please chime in. This thread is a learning location for @Spekular and whoever else wants to chime in.
No, that is the problem and that's what we're discussing. 👍
Actually, we want to avoid the Most of our developers' initiatives this past year have been around the code stability and features, not so much the themes. Themes have taken a back seat. We're getting there though... We're having the necessary discussions and we should have much better theme support in the no-so-distant future. 👍 We'll do it, we'll do it right, and we'll do our best to make it very easy to make a custom theme. 👍 |
Tested in master and 1.1, I don't see anywhere in style.css to change the background color of the buttons on the left of the settings dialogue.
The text was updated successfully, but these errors were encountered: