diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2018-04-27 01:49:00 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2018-05-07 12:42:12 +0300 |
commit | 4ec467d3b52744ba2aa4f938973efa27202b23ee (patch) | |
tree | 598d7e8506b68a8a909dd3e427e9eb34810ecd27 /source/blender/editors/include/UI_view2d.h | |
parent | 2349b9777a551ac062f7ef9e93a64cfc228d0071 (diff) |
UI: Draw scroll-bars overlapping with editor content
Scroll-bars used to draw in a little extra space in the editor, causing
buttons to jump a bit when they appeared/disappeared. Now they draw on
top of the buttons, just small enough to avoid bigger overlaps. Followup commits
will do further adjustments.
With this we can get rid of a hack that was calling the (often Python
defined) panel definition - the panel 'draw' callback - twice.
Diffstat (limited to 'source/blender/editors/include/UI_view2d.h')
-rw-r--r-- | source/blender/editors/include/UI_view2d.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 65c69c7f287..a19b2f05e2e 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -103,11 +103,11 @@ enum eView2D_Gridlines { /* ------ Defines for Scrollers ----- */ /* scroller area */ -#define V2D_SCROLL_HEIGHT (0.55f * U.widget_unit) -#define V2D_SCROLL_WIDTH (0.55f * 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) */ -#define V2D_SCROLL_HEIGHT_TEXT (0.85f * U.widget_unit) -#define V2D_SCROLL_WIDTH_TEXT (0.85f * U.widget_unit) +#define V2D_SCROLL_HEIGHT_TEXT (0.79f * U.widget_unit) +#define V2D_SCROLL_WIDTH_TEXT (0.79f * U.widget_unit) /* scroller 'handles' hotspot radius for mouse */ #define V2D_SCROLLER_HANDLE_SIZE (0.6f * U.widget_unit) @@ -222,7 +222,7 @@ void UI_view2d_center_set(struct View2D *v2d, float x, float y); void UI_view2d_offset(struct View2D *v2d, float xfac, float yfac); -short UI_view2d_mouse_in_scrollers(const struct bContext *C, struct View2D *v2d, int x, int y); +short UI_view2d_mouse_in_scrollers(const struct ARegion *ar, struct View2D *v2d, int x, int y); /* cached text drawing in v2d, to allow pixel-aligned draw as post process */ void UI_view2d_text_cache_add(struct View2D *v2d, float x, float y, |