I have solved the problem of not being able to customize the MixerStrip through QSS because they lost the visual selection display.
This is the solution, not only had to assign the custom property, also update:
...qtractorMixer.cpp line 780
if (m_bSelected) { rgbBase = pal.midlight().color(); pal.setColor(QPalette::WindowText, pal.highlightedText().color()); pal.setColor(QPalette::Window, rgbBase.darker(150)); this->setProperty("selected", true); this->style()->unpolish(this); this->style()->polish(this); this->update(); } else { rgbBase = pal.window().color(); pal.setColor(QPalette::WindowText, pal.windowText().color()); pal.setColor(QPalette::Window, rgbBase); this->setProperty("selected", false); this->style()->unpolish(this); this->style()->polish(this); this->update(); }
And the QSS would be:
qtractorMixer qtractorMixerStrip[selected=true] {
background: red;
}
If you want to include it in the official code I would be grateful.
Sounds interesting. Can you
Sounds interesting. Can you share a before and after image?
It allows you to do things like this
First of all, it allows you to customize "qtractorMixerStrip" in its normal state. Borders, radius, width, background, etc.
By doing so, you lose the functionality of visually highlighting the selected track.
However, with the implementation of a custom property, setProperty(selected, true), in source code we can retrieve the state to configure it:
And you can do things like this:
Projected shadow effect when collecting tracks/expanding buses.
HOLY !@$#%!@#$^!!!!! That is
HOLY !@$#%!@#$^!!!!! That is the coolest thing ever!!!!
"By doing so, you lose the functionality of visually highlighting the selected track."
Don't forget though, the most important aspect of the current "highlighting" is the relationship between the selected track and the subsequent routing of the signal. Having the instant visual knowledge of what bus a track is routing to is big. That said, so eager to see where this goes! Nice job!
It is lost, but if it
It is lost, but if it implement "setproperty" as I indicate, you can recover it with QSS by accessing the "selected" property.
That is, implementing "setpoperty" is the way to not lose it, which is what happens now.
The gif example I have put is somewhat exaggerated, it does not work well at all, nor does it have to. It is just an example.
But I think that being able to change the background and border (radius, color and type) of the strips is important to create a style, because the mixer is the most iconic part of any daw.
Currently, if we do not want to lose any functionality, we can only change the background color, and not from QSS, but from the color scene.
What I propose would overcome this limitation.
Rui has not answered. There must be reasons for not including setProprtys in the code.
re. It is lost, but if it....
no, I don't currently see of any reason for this not getting implemented...
just busy with other things atm. cheers
Coolness. This feels like it
Coolness. This feels like it's got some serious potential.
Add new comment