UI jitter when scrolling #39256

Closed
opened 2014-03-19 01:29:42 +01:00 by Will · 10 comments

System Information
Mac OS 10.9, Radeon HD 6870

Blender Version
Broken: (2.7.0, 2014-03-15 16:37, hash 211f08d)

Short description of error
The UI jitters when scrolling. Font size changes (align to view checkbox) and titles move out of step with fields they're attached to.

blender_jitter.mov

**System Information** Mac OS 10.9, Radeon HD 6870 **Blender Version** Broken: (2.7.0, 2014-03-15 16:37, hash 211f08d) **Short description of error** The UI jitters when scrolling. Font size changes (align to view checkbox) and titles move out of step with fields they're attached to. [blender_jitter.mov](https://archive.blender.org/developer/F81772/blender_jitter.mov)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @wlesieutre

Added subscriber: @wlesieutre

Added subscriber: @mont29

Added subscriber: @mont29

Can confirm this on Linux as well…

Can confirm this on Linux as well…
Bastien Montagne self-assigned this 2014-03-19 07:08:48 +01:00

Added subscriber: @brecht

Added subscriber: @brecht

DEV NOTES: Ok, so here is the culprit…

Due to float errors and conversion to ints, ui_but_to_pixelrect() sometimes returns a smaller y-height for a given widget when you scroll the view (e.g. typical checkbox will be 20px height in default DPI, but might be set to 19 in some scroll positions).

This is especially noticeable with checkboxes, since the width of the widget is set from its height (to keep it square), but affects all other widgets which use their height to control (part of) their width (also noticeable on e.g. widgets showing an icon).

Now I’m a bit short on ideas here, apart from giving a rectf to draw callbacks (like widget_optionbut & co), and let them make their own cooking to adapt to this case (e.g. checkbox draw could set its box width from rounded height, instead of floored one, etc.).

@brecht, thoughts?

DEV NOTES: Ok, so here is the culprit… Due to float errors and conversion to ints, `ui_but_to_pixelrect()` sometimes returns a smaller y-height for a given widget when you scroll the view (e.g. typical checkbox will be 20px height in default DPI, but might be set to 19 in some scroll positions). This is especially noticeable with checkboxes, since the width of the widget is set from its height (to keep it square), but affects all other widgets which use their height to control (part of) their width (also noticeable on e.g. widgets showing an icon). Now I’m a bit short on ideas here, apart from giving a rectf to draw callbacks (like `widget_optionbut` & co), and let them make their own cooking to adapt to this case (e.g. checkbox draw could set its box width from rounded height, instead of floored one, etc.). @brecht, thoughts?

We could also just consider that minor glitch/known limitation… ;)

We could also just consider that minor glitch/known limitation… ;)

This whole pipeline could be cleaned up to avoid the conversions, but if it is just rounding errors, perhaps the button sizes can be made slightly larger? For example instead of 20.0 make it 20.1.

If there's no easy solution I wouldn't consider this a bug though, this has been an issue for as long as I can remember, and a bigger refactor may be the only good solution.

This whole pipeline could be cleaned up to avoid the conversions, but if it is just rounding errors, perhaps the button sizes can be made slightly larger? For example instead of 20.0 make it 20.1. If there's no easy solution I wouldn't consider this a bug though, this has been an issue for as long as I can remember, and a bigger refactor may be the only good solution.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Thanks for the hints, Brecht. I tried with small offsets, and using roundf instead of floorf, but it just displaces the issue to other DPI/zoom values…

So I guess we’ll call it known limitation for now. :/ Thanks for the report, anyway.

Thanks for the hints, Brecht. I tried with small offsets, and using roundf instead of floorf, but it just displaces the issue to other DPI/zoom values… So I guess we’ll call it known limitation for now. :/ Thanks for the report, anyway.
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#39256
No description provided.