Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2018-05-07 02:31:18 +0300
committerJulian Eisel <eiseljulian@gmail.com>2018-05-07 12:42:12 +0300
commit51efeb683451d896531baac949de65043edff0b6 (patch)
treea36b7c037205b77a78a0b0266a7e9ca4571a0a5a /source/blender/editors/include/UI_view2d.h
parent4ec467d3b52744ba2aa4f938973efa27202b23ee (diff)
UI: Hide & shrink scroll-bars based on cursor position
Scroll-bars are now hidden unless the cursor approaches them, in which case they smoothly grow and become more & more visible. Note that since 0d309144020168e55, scroll-bars are drawn on top of editor contents. There's no more jumping of buttons when scroll-bars appear. Technical notes: * AZones are used to adjust scrollbars based on mouse movements We may want to support screen level AZones if we want scrollbars to also smoothly appear when approaching them from a different area. I also plan to make further changes to AZones to clean up stuff a bit. * Had to move AZone handling to a post ARegion init stage, since we need the updated View2D data from there. * View2D masks and scroller rectangles are now updated on every redraw. It's cheap to do that though.
Diffstat (limited to 'source/blender/editors/include/UI_view2d.h')
-rw-r--r--source/blender/editors/include/UI_view2d.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index a19b2f05e2e..1f106e3f08d 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -103,6 +103,8 @@ enum eView2D_Gridlines {
/* ------ Defines for Scrollers ----- */
/* scroller area */
+#define V2D_SCROLL_HEIGHT_MIN (0.25f * U.widget_unit)
+#define V2D_SCROLL_WIDTH_MIN (0.25f * U.widget_unit)
#define V2D_SCROLL_HEIGHT (0.45f * U.widget_unit)
#define V2D_SCROLL_WIDTH (0.45f * U.widget_unit)
/* For scrollers with scale markings (text written onto them) */