-
-
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
[WIP] Enable Setting hotcue color via controlobject #1830
Conversation
Correction for the commit message. The DB and the Cuepointer do update, but the UI doesn't. |
Thank you. You can correct commit messages by:
|
Thank you for adopting this! :) |
I know but I don't like to amend commits that I have already pushed (since its somewhat rewriting the history which never works out). |
Generally, it's okay to force push for a pull request. If anyone else is working together with you on the same branch, force pushing can cause hassles. Also, when you force push GitHub can't associate old comments with the specific lines of code anymore. |
Thanks for working on improving Mixxx's cue point capabilities! IMO this is the biggest remaining weak point of Mixxx compared to other DJ software. Let's take this big project step-by-step. I think a good goal for this first pull request will be integrating color selection into the track properties dialog and using that color in the waveform marks. Creating an easier to use UI for manipulating cue points could be done in another PR after this. Before you put in the work to do that, you may want to work on https://bugs.launchpad.net/mixxx/+bug/1277689 to allow easier access to the existing track properties window. |
This is ready to be merged IMHO... |
The CodeFactor issue is: |
// the Color is stored as a QRgb (which is just a unsigned int | ||
// representation of the color (AARRGGBB) | ||
m_hotcueColor = new ControlObject(keyForControl(i, "color")); | ||
connect(m_hotcueColor, SIGNAL(valueChanged(double)), |
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 think this is a randomly CO and should not be changed directly by skin or controller scrips, right?
In this case you need to connect the valueChangeRequest() and discard changes there. Programmatically you can use setAndConfirm to bypass the request.
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 just mimicked how the already existing r/w COs work. I'm trying to plan ahead for integration into skin (where writing to the CO might be useful (maybe, I don't know how such a widget would even be implemented).
And what do you mean by "randomly CO"?
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.
randomly read only
Works good. |
The color field in the cue table can become a combo box with for example these colors: |
I have done some tests and determined that in many circumstances, the the contrast is to low in general. The compatible colors are really depended on the context/skin in which they are displayed atleast in the overview. My current solution would be color the markers in their set color with enough contrast to the signalcolors (achieved via some borders around the marker), while still having the number within the overview in the color that is chosen by the skin (instead of the marker color) for better visibility. I have changed that the waveformrendermark to switch to a white textcolor when the color gets to dark (like you have suggested). |
While I'm playing with the colors and looking at the overview, I think we should reduce the palette and 'merge' similar colors:
|
Agree, I've chosen Would this work for you? |
So we have "no color" for all existing cues set by the skin and override able by the user. I like that idea. This will also help to adjust all existing cues to the schema in the users mind. We can't predict the users meaning of default red. |
How about white instead of grey? |
I'm sold with this argument :)
I'd avoid white because it won't work very well with a white skin. Like this one we used to have. |
well, I'm reluctant to drop neon green in LateNight.. IMO that's an essential indicator color there |
I would prefere to use rather more usable colours then less. |
I would prefere to use rather more usable colours then less. |
Just because we should be prepared to import competitors colours. The user can finally decide if a colour is useful. |
Sorry for the close cycle. I hate this button. |
good point (although I have no idea how competitors handles this) |
The problem is that we must only offer colors that can be distinguishable. The current list has colors that are too similar, and also white and black which won't render nice in all skins. |
You're right. Then white could also be used as a reserved controller color (eg. to highlight a specific hotcue) which could be useful. |
and afaik there's no way to report that issue to github itself, except the contact form. |
There's one issue if we change the default cue colors in the future:
This will happen for all blue hotcues. Ways to fix this:
@daschuer Thoughts? |
Would a relational database solve the problem? |
@Swiftb0y Thanks for the suggestion. Yes that's pretty much my proposal, but without storing to the DB, just reference color objects in code. |
Well I thought that the colors in the database would allow for more flexibility in the long run. I am not that set on preventing users completely from adding custom cue colors. Would it be possible to integrate that similar to how skins are able to override colors? Just with the exception that the user colors are stored in a separate table instead of an/(the skins) XML file?
I don't necessarily want to restart the discussion again whether we should allow custom colors but IMO it would be feasible than before if we stored the colors as IDs instead of their absolute value. |
Yes, in a future we might allow custom colors. But right now we are just implementing predefined colors. One step at a time :)
I ended up implementing this solution, but storing a color id instead of name. Thus we will be able to change both the HEX code and the name of a color safely. From the controller scripts point of view, the experience is pretty much the same. Before we needed to call a function to decode the CO value into an usable RGB color. Now you will be able to call a function to get an RGB color from the id. Same thing. Commits coming soon |
That was my Idea as well as it seems more flexible.
I'm very hyped. Thank you continuing what I started (even though I suspect that there won't be much of my code left once you're done ;)) |
Thank you for the hint ;)
I've heavily refactored |
I've opened #2016. |
definitely. |
This is my first attempt at exposing the the color feature of the hotcues to the UI. I want to base most of the Design choices on the work done by @ferranpujolcamins (https://drive.google.com/file/d/0Bw8dE5EyzDY6bk1WemUwWENlQlE/view) and the discussions in the zulip thread (https://mixxx.zulipchat.com/#narrow/stream/109122-general/topic/Colored.20Hotcues).
I want to split any further tasks (like being able to configure the hotcueproperties directly within the skin) into seperate PRs.