Commit Graph

14 Commits

Author SHA1 Message Date
add48c0074 Cleanup: use const variables in interface code 2020-08-26 10:31:44 +10:00
537c57136f Fix T79254: FCurve editor crash when zooming out to limit 2020-07-25 20:32:07 +10:00
f3b8792b96 Cleanup: Interface, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/interface` module.

No functional changes.
2020-07-03 14:48:37 +02:00
9e96c6d054 Cleanup: spelling 2020-06-05 14:34:00 +10:00
e15ffc0c54 UI: Fix Wideline AA for timeline 2020-05-20 17:48:24 +02:00
42d77fbea1 UI: Make timeline vertical bars thickness work on OSX
Make use of Polyline shader.
2020-05-19 22:43:42 +02:00
2d1cce8331 Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
b2ee1770d4 Cleanup: Rename ARegion variables from ar to region
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.

This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.

Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.

Also ran clan clang format on affected files.
2020-03-06 17:19:23 +01:00
e472646282 Fix T65080: handle case when View2D has 0 scale 2019-05-27 17:15:29 +02:00
9877445ed7 Fix T64927: bad timeline number spacing with scaled UI 2019-05-21 10:57:11 +02:00
81320ce7f7 Fix T64766: use grid size from user preferences 2019-05-20 11:48:37 +02:00
712fe561d5 UI: Fix crash when region becomes too thin 2019-05-03 17:42:45 +02:00
45ad6cd5a7 UI: Pass color id into view2d text drawing 2019-05-03 15:10:37 +02:00
667af6cf41 Refactor grid and scale indicator text drawing
This affects the timeline, dopesheet, graph editor, sequencer,
clip editor and nla editor.

Removed structs and enums: `V2D_ARG_DUMMY`, `eView2D_Units`,
`eView2D_Clamp`, `eView2D_Gridlines`, `View2DGrid`.

A main goal of this refactor is to get rid of the very generic
`View2DGrid` struct. The drawing code became very complex
because there were many different combinations of settings.

This refactor implements a different approach.
Instead of one very generic API, there are many slighly
different functions that do exactly, what we need in the
different editors. Only very little code is duplicated,
because the API functions compose some shared low level code.

This structure makes the code much easier to debug and change,
because every function has much fewer responsibilities.

Additionally, this refactor fixes some long standing bugs.
E.g. when `Show Seconds` is enabled, you zoom in and pan the view.
Or that the step size between displayed frame numbers was
always `>= 2`, no matter how close you zoom in.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4776
2019-05-02 12:00:12 +02:00