UI: Fix inconsistent menu background padding #111826
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#111826
Loading…
Reference in New Issue
No description provided.
Delete Branch "lone_noel/blender:menu-padding"
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 is something from 2.5, has already been partially disabled for a
long time.
This patch was originally authored by Yevgeny Makarov (@jenkm) as
https://archive.blender.org/developer/D13394 , now porting this as a PR.
Comparison
I remember this one! Wondered what happened to it.
Thanks @jenkm and @lone_noel !
@lone_noel
Sorry that I haven't actually tested this yet, but taking a quick look this looks like it will have unintended consequences with popup context menus. Right now there is a test for (block_flag & UI_BLOCK_POPUP) that will be true for context menus so it will avoid the next code blocks. With yours fairly certain a context menu will get its top or bottom corners squared off.
@Harley you were right! The top corners were indeed squared off. I had only tested it with nested menus, not popups. That is fixed now!
This works well. But it does have some odd overlap with your changes in #111554. And I find the function name
widget_menu_back_roundbox_set
be not a good fit since it doesn't set anything.Ideally if this makes changes to
widget_menu_back
to solve this issue it would do so in a way that compatible with #111554. That way you can remove the changes from that PR and it will be easier to review since it would then contain only changes tointerface_region_popup.cc
.Would something like this work for both?
I don't disagree that it's a bit odd, but I chose the name to be consistent with
widget_roundbox_set
which does the same thing for normal widgets. But if simplified like you mentioned it might not be necessary to make this it's own function.Sounds good.
I think it should. I remember the padding being the only reason this didn't work in #111554 but I'll test to make sure.
Thanks for all the feedback! I should be able to update this and the related PRs by tomorrow!
UI: Fix inconsistent menu backround paddingto UI: Fix inconsistent menu background padding@Harley After testing it unfortunetely doesn't quite work, since nested menus will now only have only the outer corners rounded.
(The comment
/* menu is 2nd level or deeper */
seems to be wrong, since nested menus are not considered popups, since they are emitted from a button...)This can be fixed, but it goes into a similar territory as #111554 creating even more overlap.
So i've updated this patch to be as minimal of a change as can be. We can either merge this as the small fix it is or close this PR and I'll just include the removal of the padding in #111554, since it touches this area anyway.
I also found that breaking out the other changes in interface_region_popup.cc from #111554 into this one doesn't work too well, since they really only make sense in the context of supporting more complex corner rounding.
Make sense.
The other complications can be dealt with in #111554