diff options
author | Julian Eisel <julian@blender.org> | 2020-04-16 21:42:56 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-04-16 21:50:51 +0300 |
commit | 9029690a5df8fc34dd8246a6d0104d2c9bd1102c (patch) | |
tree | 99528aa6b82e0db0f091be165ed3144d6d2a3a84 /source/blender/editors/screen | |
parent | b374fcc98f99db50c93ee445de2a6532e9adb998 (diff) |
UI: Remove old hacks for dynamic scrollbar hiding
Although we still dynamically hide scrollbars, they don't change the
region size anymore. They are simply drawn on top of the region content.
Because of this, some hacks introduced by fa28e50ac2a7 are no longer
necessary.
Without these hacks, the scrollbar visibility is evaluated much more
often (cheap operation) which should be more reliable and possibly solve
some glitches.
Also replaces integers passed as booleans.
Fixes T75782.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/area.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 49838b62b71..69cfe72308f 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -2532,7 +2532,6 @@ void ED_region_panels_layout_ex(const bContext *C, v2d->scroll |= (V2D_SCROLL_BOTTOM); v2d->scroll &= ~(V2D_SCROLL_RIGHT); } - const int scroll = v2d->scroll; /* collect categories */ if (use_category_tabs) { @@ -2642,16 +2641,6 @@ void ED_region_panels_layout_ex(const bContext *C, /* this also changes the 'cur' */ UI_view2d_totRect_set(v2d, x, y); - if (scroll != v2d->scroll) { - /* Note: this code scales fine, but because of rounding differences, positions of elements - * flip +1 or -1 pixel compared to redoing the entire layout again. - * Leaving in commented code for future tests */ -#if 0 - UI_panels_scale(region, BLI_rctf_size_x(&v2d->cur)); - break; -#endif - } - if (use_category_tabs) { region->runtime.category = category; } |