UI: Fix Scrollbar overlaps sidebar on zoom #108295
Open
Harley Acheson
wants to merge 2 commits from
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Harley/blender:CatScroll
into main
pull from: Harley/blender:CatScroll
merge into: blender:main
blender:temp-sculpt-dyntopo
blender:main
blender:asset-shelf
blender:blender-v3.6-release
blender:temp-sculpt-dyntopo-hive-alloc
blender:brush-assets-project
blender:blender-v3.3-release
blender:tmp-usd-python-mtl
blender:asset-browser-frontend-split
blender:node-group-operators
blender:blender-v2.93-release
blender:universal-scene-description
blender:temp-sculpt-attr-api
blender:blender-v3.5-release
blender:realtime-clock
blender:sculpt-dev
blender:gpencil-next
blender:bevelv2
blender:microfacet_hair
blender:blender-projects-basics
blender:xr-dev
blender:principled-v2
When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Reviewers
Request review
No reviewers
Labels
Clear labels
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
Apply labels
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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Issues relating to security: https://wiki.blender.org/wiki/Process/Vulnerability_Reports
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 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
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
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
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
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
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Set Project
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#108295
Reference in New Issue
There is no content yet.
Delete Branch "Harley/blender:CatScroll"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
When zooming an area with panel category tabs, the vertical scroll bar
can be placed in a position that overlaps the tabs.
This is offered as a simpler alternative to #106014. This is actually the same solution, but done more succinctly so should be easier to review. Our hope is to get this into 3.6 as a bug fix.
Did you check on handing this when the scroll-bars are initially placed?
The problem with moving the scroll bars while drawing is the action zones might not be updated for event handling, testing the patch it causes flickering opacity & size while dragging.
@ -3137,1 +3139,3 @@
mask.xmax -= UI_PANEL_CATEGORY_MARGIN_WIDTH;
const int category_tabs_width = round_fl_to_int(UI_view2d_scale_get_x(®ion->v2d) *
UI_PANEL_CATEGORY_MARGIN_WIDTH);
mask.xmax = mask.xmax - category_tabs_width;
Can still use
-=
.@ -3138,0 +3142,4 @@
BLI_rcti_translate(®ion->v2d.vert, -category_tabs_width, 0);
/* Adjust the scroller's action zone. */
LISTBASE_FOREACH (AZone *, az, &CTX_wm_area(C)->actionzones) {
It would read more clearly if there was a function to lookup the action zone, e.g.
I did and found no luck. In this panel draw we call UI_view2d_scrollers_draw_ex with a mask only in this case, but currently calculating the right side without using local zoom. But if corrected the azone is in the wrong spot.
I'm not seeing a differing behavior from current while dragging over the scrollbars. I'm just test by dragging an outliner item over it and it seems to look the same as 3.5 while doing so. Are you testing a particular action that looks worse?
Still not sure what you are seeing. When testing I see the same behavior with size and opacity changes while approaching, and while dragging the scrollbar it looks the same to me. Are you describing something different, a different process, or state from the following?
@ -3138,0 +3143,4 @@
/* Adjust the scroller's action zone. */
AZone *az = ED_area_actionzone_find_by_type(CTX_wm_area(C), region, AZONE_REGION_SCROLL);
if (az) {
I don't like the idea of manipulating action-zones in region drawing code, this has quite a bit of a code smell to me.
region_azone_scrollbar_init()
sets the azone rectangles, could we do this elsewhere, based on the modified mask rectangle?We could do it as part of
area_actionzone_refresh_xy()
, but that might not be called when we need it. Another option is to support dynamically changing rectangles, e.g. there could be aAZone.get_rect()
callback instead ofAzone.rect
.Yes, a bit whiffy to me too.
It looks like it might be possible to modify
area_actionzone_refresh_xy
but might make a bit of a mess. Instead of testing the point against the azone's rect we could (just for AZONE_REGION_SCROLL) test against the az->region->vert (+- V2D_SCROLL_HIDE_WIDTH) instead. That way the azone's rect doesn't have to be changed? Would look weird to treat one type of zone differently though and to ignore its actual position.Reviewers