UI: Highlight Selected Enum #111074
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#111074
Loading…
Reference in New Issue
No description provided.
Delete Branch "Harley/blender:SelectedEnum"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR highlights the currently-selected item in emum lists.
To show how this aids in consistency, consider the following four UI elements, all side by side. Currently three of those four show the hover highlight in gray, and show the currently-selected item in blue. But pivot point is different: it does not show selected at all and highlights in blue. This patch makes all four consistent:
Image Format selection:
Changing editor type:
Glad to see this one coming back!
The only issue I see with this at the moment is that the blue color for active items is not consistent in two cases:
Datablock selectors. They seem to use the hover effect (gray) instead of active (blue).
Shading nodes dropdown are missing the active item highlight. Not a biggie but wonder if it's possible to also have it working there.
A small note, I think using
0.2f
instead of0.3f
might be closer to the other hover effects we have.Test with
0.2f
:Thanks!
I updated this PR for that change. But still looking for the code that affects the other areas not highlighting correctly. Will dive back in and look some more after I catch up with other things.
@pablovazquez
Only just noticed that UILists have a different selected color, but that is just a theme change. This is currently the only difference between
wcol_list_item
andwcol_view_item
: the selected color. This difference would go away if we amalgamate those two, and make both list types usewcol_list_item
then adjust the selected color.Here is this PR with a UIList with selected color changed from default:
Here is this PR with a new ListView with default colors:
Great! All for consistency. +1
#111584 Should make it consistent. But the selected color is not currently blue because it clashes with the item name editing mode. If the selection color is blue, then when editing the item name, the cursor and text highlight is invisible, as it has the same blue accent color. So inner_sel property of list_item widget will have be the gray one, not the blue one.
Highlighting selected could be especially useful for Studio shading and matcaps, at the moment it is hard to say which one is enabled.
Thanks for pointing that out. Fixed a mistake that shows those now:
Testing the latest version. Love the MatCaps highlight!
On pulldown menus, having checkboxes highlighted is a bit jarring:
And also sub-menus probably shouldn't be highlighted as well. Especially with the slight delay on open it doesn't work well, in the video below I'm not clicking on the sub-menus, just hovering:
Oh sorry about that, I didn't notice that those are the same things, both menu item for some reason. Will have to figure something out there.
@pablovazquez
Fixed. We are back to having the exact same pulldown behavior as previous versions, but still with the added highlighting of the selected MatCap. In a nutshell the MatCap items are just menu items, so had to deal with those more specifically by checking that their flags include UI_BUT_ICON_PREVIEW.
Thanks! Works as expected now. 🎉
@blender-bot build
While I'm in general in support of the idea behind this change, I have some concerns with the state this landed in.
On the code side:
UI_BUT_LIST_ITEM
for buttons that have nothing to do with list items? Almost all buttons in RNA menus in fact. This is abusing a flag that clearly has a completely different purpose, which can lead to unexpected consequences in the future.UI_BUT_ACTIVE_DEFAULT
flag? Same here, this flag has a different purpose. It doesn't only affect drawing but also handling. For example I cannot open an RNA menu anymore and use arrow keys + enter to activate a different item. Enter will always reactivate the already active (blue highlighted) item.This should have gone through code review. Luckily I happened to look into the committed code.
On the UI design side:
Sorry for the negativity here. But if I look at this from a user/product experience point of view, this just feels very unpolished with obvious consistency problems.
No worries! Let's fix it.
AFAICT, that UI_BUT_LIST_ITEM was used to differentiate from dropdown menu behavior, but doesn't seem needed anymore. UI_BUT_ACTIVE_DEFAULT seemed like a fairly close fit. We could get rid of that UI_BUT_LIST_ITEM usage AND get swap the use of UI_BUT_ACTIVE_DEFAULT with UI_SELECT_DRAW, which seems an even closer fit - "Display selected, doesn't impact interaction"
This would be fixed with the above change.
This I might need some help with. I can get this work really nicely, with separate hover from selection (so better than now).
But only by adding UI_SELECT_DRAW inside
ui_but_activate_over
.I can put these two things into separate PRs for you to review?
Pre-highlight! Marvelous.