-
-
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
src/widget: Replace CueMenu implementation with a custom popup #2362
Conversation
According to https://doc.qt.io/qt-5/qgridlayout.html you could try to use |
When I mentioned the cue label lineedit I considered Do we need those buttons? |
I'm using the |
while this is probably no big deal with a hotcue label, there's no way to revert the changes if I screwed up the label text? the current dialog has a cancel button btw. |
You can still use Ctrl-Z before the pop-up window is closed. And usually you don't really type long texts into the label field, just a few words like "before drop" or something like that. Apply/Cancel buttons are not really necessary for this use case IMHO. |
Thanks. It turns that this was caused by setting the This is how it looks now: |
Due to the long button label the "Remove" button is too large. It should use an icon instead IMHO. What is the policy regarding icons? I thought about using this one: https://github.com/feathericons/feather/blob/master/icons/trash-2.svg But this might look a bit out of place depending on the skin. Can we make the button icon styleable by skins/qss? |
Ok, just used the icon from @ferranpujolcamins What do you think? This isn't the cue over you outlined in your GSoC proposal but it should improve the workflow for the time being. IMHO this is ready to merge now. |
As long as this is a regular QMenu with QPushButtons it can be styled. Nice to have: each button 'knows' if its color is currently assigned to the hotcue in question so the button's 'pressed' state can be styled, too. |
Also, I somehow fear the clear button could be mistaken as Clear button for the lineedit. That can be resolved by some style that clearly separates it from the lieedit, or simply with a different icon, something like the rubbish bin icon you suggested. |
Almost forgot: qss icons wouldn't override c++ icons, but be drawn over it (or underneath), so please also name the Remove button (HotcueRemoveButton?) and add a style snippet to all skins, much like for the searchbox' Clear button: https://github.com/mixxxdj/mixxx/blob/master/res/skins/LateNight/style.qss#L1970 (I removed the c++ style to properly paint the focused state) |
@Holzhaus What could be the reason I only get grey buttons? btw the button with the previously seleted cue color has some kind of outline so I guess that can be styled with qss. |
The remove button is quite ambiguous. How about adding a status bar on top of the dialog with the hot cue number and current color and time if you like. There is likely enough space for a labeled "clear hot cue" button than. |
@daschuer I was just deleting duplicate comments (bad internet connection?). |
Can you elaborate? Do you mean pushing everything left of it down? Or reduce margins/padding so that it's closer to the top window border? |
I don't really mind. My initial idea was pushing the delete button up a bit and keep the overall window size. |
Ok I agree that It can remain like this. It is unusual on the first sight, but you can quickly get used to it. |
OK, I made the requested changes. Please retest. @ronso0 Please verify that you can overwrite the styles from |
👍 Yup that works. |
Clock values are IMHO not rounded. For example the minute pointer jumps to the next minute if the first one is over, independent of the presence of a seconds pointer. |
AppVeyor has timed out. So we can merge. Thank you to all involved here. :-) |
While looking for a location to put the |
Yeah, that won't hurt. |
Now we have no way for users to pick an arbitrary color outside of the default palette in #2345. |
We didn't have a way to do that before either. And #2345 will have to makes a few changes to the cue menu popup code anyway. IMHO we could add a new button with a "..." icon that opens a QColorDialog in #2345 or after #2345 has been merged. |
@Holzhaus Could you please add the stylable widgets to PR description?
|
@ronso0 OK, done |
thx! |
I think we need to tweak the button styles: color doesn't work like WYSIWYG for me, color buttons appear pale compared to the actual hotcue button colors. |
As discussed on Zulip, here's my initial implementation of a more straightforward cue menu. The last time I did some GUI programming was a few years ago (and I was using GTK+), so I'd appreciate any hints how to get rid of the padding/margin around the color picker. This is also missing an icon for removing cues and is not styled yet.
EDIT: This PR introduces some new styleable widgets: