-
-
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
Color preferences improvements #2589
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.
Thanks for working on UI polish ;-)
This mostly looks good. The button placement is probably a matter of preference but I'm okay with that. I'm unsure about the hotcue index changes (see my inline comment).
Also, maybe we need another button in place of the Discard button. In your screenshot it looks like "Discard" is translated to "Schließen ohne zu Speichern" ("Close without Saving") for German users. This is unfortunate, but I guess we can't change it to "Verwerfen" ("Discard"), right? Because we don't actually close without saving - instead we delete the currently selected palette.
@@ -62,7 +76,7 @@ | |||
<string>Automatically assigns a predefined color to a newly created hotcue point, based on its index.</string> | |||
</property> | |||
<property name="text"> | |||
<string>Assign predefined colors to newly created hotcue points</string> | |||
<string>Select consecutive palette colors for new hotcues</string> |
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.
The palette colors aren't necessarily consecutive as they can be in any order depending on the "Assign to Hotcue Index" column. However, I'd suggest we remove this option completely - see PR #2578,
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 it is very usable to have this option separate from the palette editor.
Many users probably fine with the Mixxx colors and only like to select the default color or the color by number option.
So I actually want the combobox back where we can select one or all colors from the current palette.
I think you are used to the color by number feature, right?
I like to have one default color. Currently the later is hidden and therefore unpredictable.
We need to fix that as well.
Would it OK for you to bring that box back?
} | ||
} else { | ||
for (int i = 0; i < palette.size(); i++) { | ||
hotcueColorIndicesMap.insert(i, i); |
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 it's a bit cumbersome so set a single default color for a large palette because you'd have to remove all the other numbers in the index column by hand. It's also a bit confusing because we now have numbers for the built-in track color palettes, too. The previous situation was probably also confusing, so I'm not sure which one is better. If we keep this change I think we need a context menu item to unset all indices in the palette editor.
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.
The idea was to have always the coloumn populated with the cue numbers and enable the use via the box.
So you only need to edit the column if you are not fine with this. This should effect virtually no one, isn't it?
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.
Let's say I have a palette with 10 colors. One of the colors is red. If I want all my new cues red, I have to set "assign to hotcue number" to 1 for red and an empty value for all others. Before, I could just double click next to the red color and type 1. Done.
Now I have to the the same and then delete the numbers from all other rows.
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 should be move into the paletteditor(model) classes. If there are no assigned hotcue indices, we could display grey placeholder values in the "assign to hot cue numbers" table (the placeholder values are not saved) . As soon as you set one value eyplicitly, the placeholder values should disappear.
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.
Before, I could just double click next to the red color and type 1. Done.
Interesting. That was not self explaining to me. I have actually tried to add all cue numbers to red like 1, 2, 3 ... but it fails.
A combobox with all palette colors + color by number for default cue color will be IMHO quite easy to understand compared to that.
I like to avoid to bothering the user with the palette editor if he just want to select the default color.
Does this work for you as well?
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 that setting the default color via the palette editor causes too much friction, however let's keep this out of this PR as I have an idea for that that I'd like to try in a separate PR after this one has been merged.
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 should be move into the paletteditor(model) classes. If there are no assigned hotcue indices, we could display grey placeholder values in the "assign to hot cue numbers" table (the placeholder values are not saved) . As soon as you set one value explicitly, the placeholder values should disappear.
Can you implement this? The current change also prevent reordering the palette with no indices set. Also, palette could be big so you should check if i
is less than the number of hotcues.
Why? It shows a preview of the palette. |
Because it's editable style is overwhelming. Instead it would be better to show palette as it is shown in the color selector from the skin. Instead of a combo box for selecting the palette, we can pup up a menu with all palettes shown as colors. That's way the user can compare the palettes and pick the best suitable. |
👍 |
Maybe we should make the default color palettes immutable and create a new custom palette when the user saves any edit? |
The default color palette is immutable. If you change anything you need to enter a new name in the combo box before you can click save. |
I agree. I find the implementation of the palette editor as a table overcomplicated and I think it takes much more screen space than necessary. It would be more straightforward to show a grid of colors like the cue menu. I don't understand why there is a column for assigning colors to hotcues. I would expect that the hotcue number a color is assigned to is the same as its position in the palette list. What is the need for this extra layer of indirection? |
I think it is a good step forward to merge it as it is. |
Repopulate the default color selector when changing the palette.
49e6f2b
to
b4d3fa5
Compare
Yup, thank you. The palette previews are very nice. Can you also set a miniature version as icon for the combobox items? Not necessary for merge, but would look nice and users wouldn't need to select each palette individually to see the colors. Also, can you please implement the placeholder-style hotcue indices or just revert the auto-setting of hotcue indices before merge?
We can, but as I said on #2547 I need help with the DB caching issues. If nobody figures out what causes them I cannot continue working on this. I already spent hours looking at the code but with my lack of the DB caching internals I can't spot the issue. |
comboBoxHotcueDefaultColor->setItemIcon(0, QIcon(pixmap)); | ||
|
||
for (int i = 0; i < hotcuePalette.size(); ++i) { | ||
comboBoxHotcueDefaultColor->addItem(tr("Palette") + |
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.
"Palette N" is not the right term, why no use something like "Color N: #FF8000"?
} | ||
|
||
bool autoHotcueColors = | ||
m_pConfig->getValue(ConfigKey("[Controls]", "auto_hotcue_colors"), false); |
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.
How about we change the name of this ConfigKey to hotcue_colors_by_number
? The current name is unclear. I don't think we should worry about breaking configurations considering we haven't released a beta yet and it's easy to change 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.
In this case, I think we should get entirely rid of it.
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.
Then how do you propose to keep track of whether to color hotcues by number or not? I suppose we could use a special value like -1 for HotcueDefaultColorIndex, but I think it's more appropriate to keep a separate boolean ConfigKey.
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.
This should be done after we have considered @Holzhaus plans in a follow up PR.
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.
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'd prefer to switch the name of a ConfigKey now than during beta.
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.
ping
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.
@daschuer what do you think?
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.
The current name is not that bad IMHO
I like to keep it either as it is to not break existing configurations or dispose this parameter entirely and reflect the selected combobox value in one parameter.
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 do think auto_hotcue_colors
is not a good name. On its own I have no idea what it means. hotcue_colors_by_number
would make the code easier to understand. However, I'm not going to insist on blocking this PR over this.
Nice. I think you forgot to commit or push your button reordering though. This is how it looks for me on 4b3f9b4: |
Another very minor nitpick: Can we use the |
I think we see now the behavior of different OSs wen using the QButtonBar. Can you please Provide the suggested changes as a PR. Since I am not able to test it. |
This is looking really good! Can you reverse the + and -? That's what the usual UX convention is |
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.
Add documentation for recently added classes
Done |
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.
Looks good. I think this is pretty nice now.
I have some additional small changes in mind, but these can also go in a separate PR:
- Use icons for +/- buttons if available
- Add a Delete Icon to the "Remove Palette" button if available (currently it looks strange if the other buttons all have an icon, but this button does not)
- Possibly replace the QDialogButtonBox with a HBoxLayout to get a consistent button order across all OSes (if desired)
if (paletteName == palette.getName()) { | ||
for (int i = 0; i < palette.size() && i < 4; ++i) { | ||
painter.setPen(mixxx::RgbColor::toQColor(palette.at(i))); | ||
painter.setBrush(mixxx::RgbColor::toQColor(palette.at(i))); |
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.
Can you use palette.colorForHotcueIndex()
instead? Right now, the icon may show colors that are not actually assigned to hotcues.
return QPixmap(); | ||
} | ||
|
||
QIcon DlgPrefColors::drawPaletteIcon(const QString& paletteName) { |
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.
QIcon DlgPrefColors::drawPaletteIcon(const QString& paletteName) { | |
QIcon DlgPrefColors::drawHotcueColorByPaletteIcon(const QString& paletteName) { |
ColorPaletteEditor: hide hotcue number column for track palette
Done. I have some objections to the proposed changes:
Sound good, in the first place however this may create a bunch of follow up issues: Given that only some user uses this dialog only a few times. I suggest to save you from all this work.
Do you use KDE? I think this is one of the last environments using button Icons together with text.
I think this is a bad idea. All dialogs and even the common bar on the bottom of the preferences are using the QDialogButtonBox() this should feature a consistent user interface compared to other installed applications. It is part of the KDE style to have the Discard button right of OK. |
Merge? |
Thought about that as well, but setting icons is not as easy as in the skins or the Hotcue popup: we need to choose contrasting Icons and it's not predictable what background color OS themes use. Didn't look into that: can we use OS icons? At least Delete/Trash bin icon should be available |
Most DEs that don't have button icons for buttons that also have a text label. There are icons on buttons when there is no label, which is the case here.
No, I use i3wm. I don't really care about the icon, but the inconsistency looks really bad (all other buttons do have an icon for me):
Yeah, I'm not sure about this either. I just thought that it's a bit confusing to have a different button order on different OSes (e.g. when we put screenshots into the manual). But I guess users will be able to live with that. |
I agree that using standard add/remove icons instead of "+" and "-" characters would look better.
I don't think anyone will even notice. |
Icons changed: daschuer#55 |
This is the way it looks at my machine now, somehow chunky :-/. Compared to @Be-ing s screenshot there seems to be a scaling issue. If I change to list-add-symbolic and list-remove-symbolic it looks like that: There is also he issue that this is a Linux only thing see:
So seeing all, I think lets go with + - as text. This works at any OS without additional testing and also with screen readers. Giving that this dialog is not a main Mixxx use case, it is probably not worth to investigate this issue even further , |
We ship Qt with its default built in theme on macOS and Windows. Does that not provide these icons? Anyway, I propose we merge this now and we continue with the icon discussion in a new PR that won't block the beta release. |
I'm going to go ahead and merge this now then open a new PR targeted at master for the +/- buttons. |
Good work everyone. We came up with a good solution together. |
This improved the color preferences a bit. See: