Fix topbar region refresh issues #54753

Closed
opened 2018-04-21 13:42:50 +02:00 by Brecht Van Lommel · 7 comments

The topbar uses new dynamically sized regions, where the width of the region is defined by the buttons in it. This currently has refresh and flickering issues.

The problem is that the region width is only updated after drawing, and then on the next redraw the region gets the proper width. Two possible solutions:

  • Change area drawing to first compute the UI buttons in all regions in an area, then adjust the region sizes, and then draw the regions.
  • Instead of using dynamically sized regions, keep it all within one region and improve the UI layout and drawing code to support better alignment and separators.
The topbar uses new dynamically sized regions, where the width of the region is defined by the buttons in it. This currently has refresh and flickering issues. The problem is that the region width is only updated after drawing, and then on the next redraw the region gets the proper width. Two possible solutions: * Change area drawing to first compute the UI buttons in all regions in an area, then adjust the region sizes, and then draw the regions. * Instead of using dynamically sized regions, keep it all within one region and improve the UI layout and drawing code to support better alignment and separators.
Author
Owner

Added subscriber: @brecht

Added subscriber: @brecht
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Julian Eisel self-assigned this 2018-04-21 15:23:41 +02:00
Member

I think this depends a bit on how we want to handle scrolling in the top-bar. If we don't want any scrolling and instead do things like moving tabs into a '...' menu if there are to many to display, the second solution sounds better. If we want to make sections scrollable option one should be the way to go.

Option one is a bit less of a hassle probably, although design wise I think number two sounds better.

I think this depends a bit on how we want to handle scrolling in the top-bar. If we don't want any scrolling and instead do things like moving tabs into a '...' menu if there are to many to display, the second solution sounds better. If we want to make sections scrollable option one should be the way to go. Option one is a bit less of a hassle probably, although design wise I think number two sounds better.
Author
Owner

Good point about scrolling.

The other thing is that I think it would be good to support addons registering custom regions in the topbar, and letting users resize them and toggle their visibility. Perhaps even letting users decide to have only a top bar or only a status bar, and what goes where then. With that kind of customization regions seem like a better fit.

Good point about scrolling. The other thing is that I think it would be good to support addons registering custom regions in the topbar, and letting users resize them and toggle their visibility. Perhaps even letting users decide to have only a top bar or only a status bar, and what goes where then. With that kind of customization regions seem like a better fit.
Julian Eisel was unassigned by Brecht Van Lommel 2018-04-29 22:05:27 +02:00
Brecht Van Lommel self-assigned this 2018-04-29 22:05:27 +02:00
Author
Owner

Since I was working on related code for WM drawing and popover refreshing, I went ahead and fixed this as well.

Since I was working on related code for WM drawing and popover refreshing, I went ahead and fixed this as well.
Member

Thanks a lot! I did work on a patch taking the same direction as yours, just didn't get around to finish it. Glad it's fixed now!

Thanks a lot! I did work on a patch taking the same direction as yours, just didn't get around to finish it. Glad it's fixed now!

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
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
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#54753
No description provided.