Page MenuHome

UI: Highlight Currently-Selected Enum Item
AbandonedPublic

Authored by Harley Acheson (harley) on Jun 21 2019, 10:42 PM.

Details

Summary

This patch adds an indicator to enum menus to indicate the currently set item, as discussed here:
T62309

It looks like the following:

Just adds a new uiBut flag UI_BUT_CURRENT that can be used to indicate that the item represents the currently-set value. Added a new "Extra Icon" that can decorate the right-side of items like the eyedropper icon can sometimes do. And then set this flag if showing the current item.

Using ICON_LAYER_ACTIVE just because I like the size of this circle. But I do prefer it to be a small circle like this as it adds a highlight that is not too strong and does not give any extra meaning.

Diff Detail

Repository
rB Blender

Event Timeline

While I would advocate for further improvements, this to me is already better than what we have.

This revision is now accepted and ready to land.Jun 21 2019, 10:50 PM

For sure, but at least we can play with it for a few weeks (assuming we can get this or similar into 2.81) to see what we like and what we don’t. I know we didn’t agree on which side to put the decorator, but this patch just takes the easiest path by following an existing pattern.

While I would advocate for further improvements, this to me is already better than what we have.

Could you be spesific? T62309 shows an example which has issues raised in replies, so it's not clear what the final UI might be.

Having an indication of the currently-selected option is a good thing, no matter if the menu style remains the same (hopefully) or changes to be more Mac-like (please no), which is why I wanted to break this out of that discussion.

About the only contention for this particular feature is the side of the indicator. I prefer the right because it works equally well if the list contains icons or not, and it is trivial to do this way. A left-side indication gets a bit confusing when there are doubled icons there.

Doing it as William prefers might be nicer. Works better as the menu gets wider and certainly better if it wraps into columns. I just don't like the misaligned labels on the "Editor Type: menu...

@Campbell Barton (campbellbarton) Well, the earlier proposed enum menu solution I still think we should do, for the reasons outlined - avoiding duplication of the selected item, much clearer which item was selected, and long enums are faster because travel distance always starts from the selected item.

That said, this patch doesn’t conflict with that at all, and is a nice improvement regardless, so I see no reason not to make this change.

@Campbell Barton (campbellbarton) Well, the earlier proposed enum menu solution I still think we should do, for the reasons outlined.

From replies it looks like we probably won't do this though.

If we do *something else*, it would be good to have some idea what that is.


The steps happening here seem to be:

  • A change is proposed (T62309).
  • That change isn't widely accepted.
  • A patch is proposed which might have undefined improvements later.
  • Those improvements are a vague reference to the initial proposal.

This isn't good.

If we're going to need a compromise, it's better to know what it is.
For a small task like this - it shouldn't be too complicate.

The big change in this revision is to move the indicator to the left side. It works better this way when the menu is wide, especially when broken into multiple columns. The icon shown is also changed to ICON_DOT as this size suits the location better. Looks like the following:

I think the empty space looks pretty bad. Personally I think the Windows like behavior as explained in T62309#705066 is a better solution.

I think the empty space looks pretty bad. Personally I think the Windows like behavior as explained in T62309#705066 is a better solution.

+1, it's not intrusive, doesn't give us further work for multi-column layouts.

@Campbell Barton (campbellbarton) : +1, it's not intrusive

Yes, at the bottom of that thread there is a diff that makes it look like that, along with others that do right-side and left-side dots. Hopefully is enough for @William Reynish (billreynish) to play with.