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:
authorSeverin <eiseljulian@gmail.com>2018-06-30 17:51:31 +0300
committerSeverin <eiseljulian@gmail.com>2018-06-30 18:01:03 +0300
commitb08fa7a6d981d8fa28a03a288b89bba909fb5092 (patch)
treeea722c86bef632ce91fccc9108ee4f371105e008 /source/blender/editors/screen/screen_ops.c
parenteb47ac45698fff46bf3cfb26f16223ff49ccf1d0 (diff)
UI: Support status-bar hiding
Just like the top-bar, the status-bar can now be hidden/collapsed by dragging its edge. We display a small line with the editor outline color then, so there is something that can be dragged up to un-collapse the area again. This collapsed state is not written to files yet.
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r--source/blender/editors/screen/screen_ops.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 0c124f6c9a4..ad64018929c 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1235,8 +1235,11 @@ static void area_move_set_limits(
if (use_bigger_smaller_snap != NULL) {
*use_bigger_smaller_snap = false;
for (ScrArea *area = win->global_areas.areabase.first; area; area = area->next) {
- const int size_min = ED_area_global_min_size_y(area) - 1;
- const int size_max = ED_area_global_max_size_y(area) - 1;
+ int size_min = ED_area_global_min_size_y(area) - 1;
+ int size_max = ED_area_global_max_size_y(area) - 1;
+
+ size_min = MAX2(size_min, 0);
+ BLI_assert(size_min < size_max);
/* logic here is only tested for lower edge :) */
/* left edge */
@@ -1412,7 +1415,8 @@ static int area_snap_calc_location(
break;
}
- BLI_assert(IN_RANGE_INCL(final_loc, origval - smaller, origval + bigger));
+ BLI_assert(ELEM(snap_type, SNAP_BIGGER_SMALLER_ONLY) ||
+ IN_RANGE_INCL(final_loc, origval - smaller, origval + bigger));
return final_loc;
}
@@ -1429,7 +1433,9 @@ static void area_move_apply_do(
short final_loc = -1;
bool doredraw = false;
- CLAMP(delta, -smaller, bigger);
+ if (snap_type != SNAP_BIGGER_SMALLER_ONLY) {
+ CLAMP(delta, -smaller, bigger);
+ }
if (snap_type == SNAP_NONE) {
final_loc = origval + delta;