-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
QML: Redesign demo skin #3928
QML: Redesign demo skin #3928
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why you preferred using anchors instead of containers provided by the Layout module?
Also as a general API design rule, I'd like to avoid boolean properties on the Mixxx provided components and instead use enums. At least that would be more in-line of what Qt does. Thoughts?
res/skins/QMLDemo/Button.qml
Outdated
property color normalColor: Theme.buttonNormalColor | ||
required property color activeColor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the normal color part of the theme but not the active color?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because buttons may have different active colors depending on context. E. g. PFL (Mixer) is blue, but CUE (Deck) is green.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but if they just want to use a default, the have to specify that explicitly instead of the button falling back on the Theme automatically
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. There is no sensible default, so making it required to specify ensures I don't forget it and prevents that the skin looks bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there really no sensible default for the active color of a button? Couldn't the active color just default to Qt.lighter(normalColor, 1.5)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or just have a active default color in the Theme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean this is just a non-reusable skin component.
Also, In c++ code we usually avoid default arguments when not needed, so I don't really understand why we should add it here.
Can you elaborate why this is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, I'm sorry I'm nagging so much about the polish of a prototype.
I'd say its needed because it removed redundancy in the skin (technically, not sure if this is actually an annoyance, I didn't write the code ;) )
What does @ronso0 think about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, I'm not annoyed :D I just wondered why you think it's necessary/helpful.
value: root.checked || root.down | ||
} | ||
|
||
Item { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Item { | |
foreground: Item { |
and then expose the foreground as a property? maybe it would even be possible to use an alias property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think thats possible but I'll have a look. Generally, only the stuff in the Mixxx
directory is meant to be reused by other skins, so I only added customization properties where actually needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats understandable, I'm just suggesting it because you are actually exposing the foreground on L13 if I understand correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I get what you mean.
Your original suggestion won't work, this tries to assign the foreground property which doesn't exist (and If I declare it, QML doesn't know where to display it, because it's not part of the body).
And If I make foreground an alias property directly, the property is read-only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhmm right, how did I not notice that this would clash with the regular property assignment syntax...
SixtyFPS supports this using id := Object {...}
syntax instead of having the id declared as a property on the object.
I wish that was possible because it would allow to shorten the creation of simple objects on the lines of playCO := Mixxx.createCO(group, "play")
instead of requiring 3 times the amount of code.
Do you mean Row/Column or ColumnLayout/RowLayout? I tried to avoid the latter because this makes it very hard to add animations later on.
I agree, but can you point out the specific source lines? |
Actually, Mixxx.ToggleButton is rather useless, so we might as well remove it. |
In this particular case I even meant GridLayout (with the contents then being laid out using the row&column and minimum/maximumWidth/Height properties. I don't know how that hinders animation, nor even if it makes much sense to animate that component in particular. I just thought using layouts might be easier to read or and more difficult mess up than using anchors.
most of the Mixxx Components have some extra eyecandy feature whose visibility can be configured using a boolean (Spinny.indicatorVisible, Slider.bar, Knob.arc), most of that could be just a generic visibility attribute containing an enum that describes which feature are actually visible (this would also accommodate the case where there is more than one feature). Since you are asking for specific line numbers this would be them in current master: Knob.qml:15 Slider.qml:13 Spinny.qml:9 |
what's missing when loading the QML skin fails with ... ?
|
Yikes, looks like the Try running
And try again. Maybe that works. |
nope, unfortunately not
I have those installed
|
good catch, replace |
text and non-horizontal/vertical lines look awful in general but I guess this is because of missing antialiasing? Performance stats also seem worse than they would need to be. I guess this is because lots of elements are being drawn transparently which doesn't need to be transparent and transparency (and clipping) break batching. |
okay, got it running.
and change Looks and feels nice, chapeau @Holzhaus ! |
Thank you. The only minor remaining issue I have now is the hotcue buttons. We can worry about performance once its actually starts to be a problem. |
We can have a look at that soon, but Mixxx shartup time is super fast compared to LateNight. I hope it stays like that when this skin becomes similarily feature-packed :D Btw, hotcue buttons should be fixed now. |
Thanks. Make sure to try out the 4 deck toggle and the crossfader orientation buttons ;-) |
Yeah noticed the animations. Btw, great idea to pick up the Gudron source! |
hmm..with Qt 5.12 packages I don't see any track related info (loaded in Deere before). |
Expected, requires #3911, because track info is not accessible via control proxies ;-)
Hmm, I can't reproduce. Weird. Can you give me a backtrace? |
here's the backtrace. segfault happens after the spinny made it from 12 to almost 6 o'clock |
Does this also happen when you start Mixxx with the QML skin instead of switching to it? Maybe some qwidget skin does not clean up correctly. |
Also, if you want to fix some other bugs I've found, they're documented in project#4 |
Thanks, forgot you had to introduce C++ to make it 5.12 compatible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, merge?
Added some minor fixes, ready now. The knob clamping warning is a bug in cpp. |
I played around with the QML skin controls and tried to redesign the skin from scratch to check if these controls if they actually suit our purposes. I think they do. Some of the images were adapted from the SVG linked here.