Regression: Right aligned header
#100141
Closed
opened
No Branch/Tag Specified
main
blender-v3.6-release
temp-sculpt-dyntopo-hive-alloc
temp-sculpt-dyntopo
asset-shelf
cycles-light-linking
tmp-usd-python-mtl
brush-assets-project
blender-v2.93-release
blender-v3.3-release
universal-scene-description
node-group-operators
asset-browser-frontend-split
temp-sculpt-attr-api
blender-v3.5-release
realtime-clock
sculpt-dev
gpencil-next
bevelv2
microfacet_hair
blender-projects-basics
principled-v2
v3.3.7
v2.93.18
v3.5.1
v3.3.6
v2.93.17
v3.5.0
v2.93.16
v3.3.5
v3.3.4
v2.93.15
v2.93.14
v3.3.3
v2.93.13
v2.93.12
v3.4.1
v3.3.2
v3.4.0
v3.3.1
v2.93.11
v3.3.0
v3.2.2
v2.93.10
v3.2.1
v3.2.0
v2.83.20
v2.93.9
v3.1.2
v3.1.1
v3.1.0
v2.83.19
v2.93.8
v3.0.1
v2.93.7
v3.0.0
v2.93.6
v2.93.5
v2.83.18
v2.93.4
v2.93.3
v2.83.17
v2.93.2
v2.93.1
v2.83.16
v2.93.0
v2.83.15
v2.83.14
v2.83.13
v2.92.0
v2.83.12
v2.91.2
v2.83.10
v2.91.0
v2.83.9
v2.83.8
v2.83.7
v2.90.1
v2.83.6.1
v2.83.6
v2.90.0
v2.83.5
v2.83.4
v2.83.3
v2.83.2
v2.83.1
v2.83
v2.82a
v2.82
v2.81a
v2.81
v2.80
v2.80-rc3
v2.80-rc2
v2.80-rc1
v2.79b
v2.79a
v2.79
v2.79-rc2
v2.79-rc1
v2.78c
v2.78b
v2.78a
v2.78
v2.78-rc2
v2.78-rc1
v2.77a
v2.77
v2.77-rc2
v2.77-rc1
v2.76b
v2.76a
v2.76
v2.76-rc3
v2.76-rc2
v2.76-rc1
v2.75a
v2.75
v2.75-rc2
v2.75-rc1
v2.74
v2.74-rc4
v2.74-rc3
v2.74-rc2
v2.74-rc1
v2.73a
v2.73
v2.73-rc1
v2.72b
2.72b
v2.72a
v2.72
v2.72-rc1
v2.71
v2.71-rc2
v2.71-rc1
v2.70a
v2.70
v2.70-rc2
v2.70-rc
v2.69
v2.68a
v2.68
v2.67b
v2.67a
v2.67
v2.66a
v2.66
v2.65a
v2.65
v2.64a
v2.64
v2.63a
v2.63
v2.61
v2.60a
v2.60
v2.59
v2.58a
v2.58
v2.57b
v2.57a
v2.57
v2.56a
v2.56
v2.55
v2.54
v2.53
v2.52
v2.51
v2.50
v2.49b
v2.49a
v2.49
v2.48a
v2.48
v2.47
v2.46
v2.45
v2.44
v2.43
v2.42a
v2.42
v2.41
v2.40
v2.37a
v2.37
v2.36
v2.35a
v2.35
v2.34
v2.33a
v2.33
v2.32
v2.31a
v2.31
v2.30
v2.28c
v2.28a
v2.28
v2.27
v2.26
v2.25
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
11 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#100141
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. It CANNOT be undone. Continue?
System Information
Operating system: Linux-5.4.0-122-generic-x86_64-with-glibc2.31 64 Bits
Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.129.06
Blender Version
Broken: version: 3.4.0 Alpha, 3.3
Worked: 3.2
Caused by
6243972319
Short description of error
dragging open a new editor window horizontally has the menu bar right aligned. this has the dropdown with the different editors out of view from startup.
and it overwrite the left alignment of the shrinking editor window as well.
Exact steps for others to reproduce the error
editor.mp4
Added subscriber: @ToxicTuba
blender/blender-addons#101261 was marked as duplicate of this issue
#101187 was marked as duplicate of this issue
#101189 was marked as duplicate of this issue
#101181 was marked as duplicate of this issue
#101136 was marked as duplicate of this issue
#101024 was marked as duplicate of this issue
#101003 was marked as duplicate of this issue
#100933 was marked as duplicate of this issue
#100929 was marked as duplicate of this issue
#100930 was marked as duplicate of this issue
#100927 was marked as duplicate of this issue
#100221 was marked as duplicate of this issue
Added subscriber: @OmarEmaraDev
Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Not sure if this is considered a bug by the module, but it seems inconvenient to me, so I will tag the module for a decision.
This actually changed in 3.3, in older versions it was left aligned, which is causing more issues for smaller screens as can be seen in #100221.
Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Added subscriber: @Memento
Added subscribers: @Harley, @PratikPB2123
Introduced in
6243972319
Change doesn't look intended from commit message at least
@Harley, can you take a look?
dragging open a new editor window horizontally has the menu bar right alignedto Regression: dragging open a new editor window horizontally has the menu bar right alignedAdded subscriber: @AnthonyEdlin
@AnthonyEdlin - Any ideas?
If not I can look at this fairly soon, just buried a bit.
Previously the regions would always scroll left or up by a little bit when resizing, which was causing the outliner to scroll up when resizing the area smaller. Now they should keep the offset, and pretty sure I tested the headers when making the patch.
Just tested on 3.3 and it looks like the headers never keep left side offset when resizing, so definitely not working.
I'm gone this weekend, but I'll check it out when I'm back.
Thanks @AnthonyEdlin! There were definitely parts of your patches where we weren't entirely sure they were needed, so might have left something important out.
I'm sure you noticed, but I made a patch that only puts back enough to make this current problem go away: D15873: Fix #100141: Header Alignment of New Editors. In case that helps you figure out what I screwed up. LOL
Yes, for sure. Enjoy your weekend. This problem hasn't come close to killing anyone yet.
Added subscriber: @Ott
Added subscriber: @Leroy-Xie
Added subscriber: @bariclee951
Added subscriber: @DragonLadyMerlin
Regression: dragging open a new editor window horizontally has the menu bar right alignedto Regression: Right aligned headerIt seems to be enough to just make the headers keep x offset just like outliner. Not sure why it wasn't included in original patch.
Here is diff:
fix_headers_offset_x.diff
@AnthonyEdlin
Not sure how important it is, but your one-line fix doesn't quite restore all the old behavior. It keeps the header from moving while dragging out, but new editors get the same offset rather than being reset to left. In other words: Start with a 3D View, and resize it so that it cannot contain the entire header. Then drag its header to the right. If you then split (using corner action zone) the new area will be offset like the original.
{F13473231,width=100%}
In prior versions of Blender the new area will be at left edge. From version 3.01:
{F13473236,width=100%}
D15873: Fix #100141: Header Alignment of New Editors does seem to restore this behavior as well.
Added subscriber: @Wovchick
Added subscriber: @NICEUU
@Harley
That's not quite how it works. I'll try to explain.
There are the two relevant code sections before the original patch, first:
and then just after that this:
The first section of code will scroll the header to the left by the difference of the old size and the new size, but only if the region is getting smaller. Then the second section of code, since before the patch V2D_KEEPOFS is not set, it will use the "else" clause to try and resize around the center of the region.
Here is an example with numbers. Say you have a region with a size of 204, and the cur rect xmin is 200 and the xmax is 404. This is the state with the header scrolled 200 pixels to the right. Now you resize the area 4 pixels smaller to 200. First the cur rect is moved over 4 pixels so xmin is 196 and xmax is 400, then the second section of code resizes the cur rect to the correct size based from the center, so that would be 198 to 398. This is why resizing an area smaller almost always scrolls the header. This combination of code effectively scrolls the header left by half the resize value.
You probably know that when resizing areas it is clamped, if I remember correctly, to 4 pixels so it doesn't redraw too much. So in most cases a resize of a region will be by 4, but there are some cases where the resize will be smaller or bigger, for instance if you resize a floating window 1 pixel smaller by grabbing the edge, or by restoring and maximizing a window. Try these out and you will see either no scroll because it's to small of a resize or a bunch of scrolling because the resize will be larger.
That brings us back to your example of a new area. When you create a new area it copies all the data from the area it is splitting. So using similar numbers from before, say you have a region with a size of 200 and the cur rect is 200 to 400. When the new area is created it will copy those numbers but the area will only be like 20 pixels wide at first, so it will resize down. Following the logic again it will shift over 180 so the cur rect will be 20 to 220 and then it will size down to the center, which leaves the cur rect at 110 to 130. This is clearly not reset all the way to the left.
Here is from blender 3.2:
SplitOld.mp4
Obviously if you split from a very large area or a header that isn't scrolled very far, it can scroll enough that it looks like it reset back to the left, as in your example.
So, with all that said, what is the proper fix? Is the scrolling a bug or a feature? I think there is a case to say that scrolling left on headers in some cases may be good. It tends to keep the headers scrolled left when you do any resizing, which may be ok even though it has edge cases. The problem with it is those edge cases, and it also leads to the situation where basically no one understands how the view2d code works.
The reason I choose to just remove it in the patch and use the V2D_KEEPOFS_X is because everything I just described regarding why headers and outliner scroll when resizing smaller goes away and the logic for resizing basically boils down to this line:
You are correct that when you make a new area it doesn't reset the header, it just copies the offset, but I would rather explicitly just reset the header when the area is duplicated then use the random scrolling that might or might not reset the header by scrolling. That would be a separate issue then. But this is just my opinion.
Either way, it should not do what it is doing now and resize from the center when shrinking the region size. With 3.3 released there are probably going to be a deluge of reports about this.
Added subscriber: @ideasman42
Yes, any chance to simplify this is worth trying for.
Yes, we are getting one or two complaints per day now I think.
Like this? Not sure if there might be unintended consequence of resetting the view in ED_area_data_copy...
Any thoughts @ideasman42?
@AnthonyEdlin
I updated D15873: Fix #100141: Header Alignment of New Editors to add that
V2D_KEEPOFS_X
and to reset the views of the new area - but doing so insidearea_split
so it can't affect anything else.One thing I have not been able to confirm fixed - because I haven't been able to recreate the issue - is complaints like #100933 (3.3.0 Menu Bars Partly Hidden On Small Monitor) where the initial layout has the main menu scrolled over when the monitor is very small.
@Harley
I'm sure resetting all regions in ED_area_data_copy must screw up graph views and VSE views at least. At very least want to just reset header regions, and preferably just when splitting for now.
I did it with this diff, but haven't tested it extensively:
fix_headers_offset_x_with_header_reset.diff
Good point. I updated D15873: Fix #100141: Header Alignment of New Editors to only reset headers.
Hi, I'm not a developer, I just want to say something, not only the newly split editor. All editors have this type of problem when they are zoomed out. When the header is full, it will be center aligned. Older versions always keep left-aligned.
20220915_11.48_721.mp4
Yes, test D15873: Fix #100141: Header Alignment of New Editors to confirm.
Added subscribers: @blender.girl, @Aliderees, @greninjakdkd
Added subscriber: @RP-3
Added subscriber: @ellie553
Added subscribers: @Akadyan, @ThomasDinges
Closed as duplicate of #101187
Changed status from 'Duplicate' to: 'Confirmed'
Argh, sorry merged the wrong way.
Added subscriber: @Sorataemin
Added subscribers: @SME73, @deadpin
This issue was referenced by
4b0243dae4
This issue was referenced by
c172522060
Changed status from 'Confirmed' to: 'Resolved'