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:
authorCampbell Barton <ideasman42@gmail.com>2018-11-14 09:12:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-14 09:21:34 +0300
commit55e719ec35a10c3f9e7231dee13d4b05aad7d965 (patch)
tree563ed5b1b27e9613de8384da90197ce2c3e1924b /source/blender/editors/interface/view2d.c
parentc279f879ab86e03dff0dbfd3a36b14bebb4956f9 (diff)
parentd7f55c4ff58f87b80f0ce2fa43ce2f7cd2b72675 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c74
1 files changed, 37 insertions, 37 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 4bd22956e8b..80f4bb57baa 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -162,8 +162,8 @@ static void view2d_masks(View2D *v2d, bool check_scrollers, const rcti *mask_scr
scroll = view2d_scroll_mapped(v2d->scroll);
/* scrollers are based off regionsize
- * - they can only be on one to two edges of the region they define
- * - if they overlap, they must not occupy the corners (which are reserved for other widgets)
+ * - they can only be on one to two edges of the region they define
+ * - if they overlap, they must not occupy the corners (which are reserved for other widgets)
*/
if (scroll) {
const int scroll_width = (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) ?
@@ -406,16 +406,16 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
tot = &v2d->tot;
/* we must satisfy the following constraints (in decreasing order of importance):
- * - alignment restrictions are respected
- * - cur must not fall outside of tot
- * - axis locks (zoom and offset) must be maintained
- * - zoom must not be excessive (check either sizes or zoom values)
- * - aspect ratio should be respected (NOTE: this is quite closely related to zoom too)
+ * - alignment restrictions are respected
+ * - cur must not fall outside of tot
+ * - axis locks (zoom and offset) must be maintained
+ * - zoom must not be excessive (check either sizes or zoom values)
+ * - aspect ratio should be respected (NOTE: this is quite closely related to zoom too)
*/
/* Step 1: if keepzoom, adjust the sizes of the rects only
- * - firstly, we calculate the sizes of the rects
- * - curwidth and curheight are saved as reference... modify width and height values here
+ * - firstly, we calculate the sizes of the rects
+ * - curwidth and curheight are saved as reference... modify width and height values here
*/
totwidth = BLI_rctf_size_x(tot);
totheight = BLI_rctf_size_y(tot);
@@ -525,9 +525,9 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
if (do_cur) {
if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winx != v2d->oldwinx)) {
/* special exception for Outliner (and later channel-lists):
- * - The view may be moved left to avoid contents being pushed out of view when view shrinks.
- * - The keeptot code will make sure cur->xmin will not be less than tot->xmin (which cannot be allowed)
- * - width is not adjusted for changed ratios here...
+ * - The view may be moved left to avoid contents being pushed out of view when view shrinks.
+ * - The keeptot code will make sure cur->xmin will not be less than tot->xmin (which cannot be allowed)
+ * - width is not adjusted for changed ratios here...
*/
if (winx < v2d->oldwinx) {
float temp = v2d->oldwinx - winx;
@@ -548,7 +548,7 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
else {
if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winy != v2d->oldwiny)) {
/* special exception for Outliner (and later channel-lists):
- * - Currently, no actions need to be taken here...
+ * - Currently, no actions need to be taken here...
*/
if (winy < v2d->oldwiny) {
@@ -635,8 +635,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
}
else if (v2d->keeptot == V2D_KEEPTOT_STRICT) {
/* This is an exception for the outliner (and later channel-lists, headers)
- * - must clamp within tot rect (absolutely no excuses)
- * --> therefore, cur->xmin must not be less than tot->xmin
+ * - must clamp within tot rect (absolutely no excuses)
+ * --> therefore, cur->xmin must not be less than tot->xmin
*/
if (cur->xmin < tot->xmin) {
/* move cur across so that it sits at minimum of tot */
@@ -667,8 +667,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
}
else {
/* This here occurs when:
- * - width too big, but maintaining zoom (i.e. widths cannot be changed)
- * - width is OK, but need to check if outside of boundaries
+ * - width too big, but maintaining zoom (i.e. widths cannot be changed)
+ * - width is OK, but need to check if outside of boundaries
*
* So, resolution is to just shift view by the gap between the extremities.
* We favour moving the 'minimum' across, as that's origin for most things
@@ -718,8 +718,8 @@ static void ui_view2d_curRect_validate_resize(View2D *v2d, bool resize, bool mas
}
else {
/* This here occurs when:
- * - height too big, but maintaining zoom (i.e. heights cannot be changed)
- * - height is OK, but need to check if outside of boundaries
+ * - height too big, but maintaining zoom (i.e. heights cannot be changed)
+ * - height is OK, but need to check if outside of boundaries
*
* So, resolution is to just shift view by the gap between the extremities.
* We favour moving the 'minimum' across, as that's origin for most things
@@ -1690,8 +1690,8 @@ View2DScrollers *UI_view2d_scrollers_calc(
scrollers->hor = hor;
/* scroller 'buttons':
- * - These should always remain within the visible region of the scrollbar
- * - They represent the region of 'tot' that is visible in 'cur'
+ * - These should always remain within the visible region of the scrollbar
+ * - They represent the region of 'tot' that is visible in 'cur'
*/
/* horizontal scrollers */
@@ -1861,11 +1861,11 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
btheme->tui.widget_emboss[3] *= alpha_fac; /* will be reset later */
/* show zoom handles if:
- * - zooming on x-axis is allowed (no scroll otherwise)
- * - slider bubble is large enough (no overdraw confusion)
- * - scale is shown on the scroller
- * (workaround to make sure that button windows don't show these,
- * and only the time-grids with their zoomability can do so)
+ * - zooming on x-axis is allowed (no scroll otherwise)
+ * - slider bubble is large enough (no overdraw confusion)
+ * - scale is shown on the scroller
+ * (workaround to make sure that button windows don't show these,
+ * and only the time-grids with their zoomability can do so)
*/
if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0 &&
(v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) &&
@@ -1883,8 +1883,8 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
float fac, dfac, fac2, val;
/* the numbers: convert grid->startx and -dx to scroll coordinates
- * - fac is x-coordinate to draw to
- * - dfac is gap between scale markings
+ * - fac is x-coordinate to draw to
+ * - dfac is gap between scale markings
*/
fac = (grid->startx - v2d->cur.xmin) / BLI_rctf_size_x(&v2d->cur);
fac = (float)hor.xmin + fac * BLI_rcti_size_x(&hor);
@@ -1964,11 +1964,11 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
btheme->tui.widget_emboss[3] *= alpha_fac; /* will be reset later */
/* show zoom handles if:
- * - zooming on y-axis is allowed (no scroll otherwise)
- * - slider bubble is large enough (no overdraw confusion)
- * - scale is shown on the scroller
- * (workaround to make sure that button windows don't show these,
- * and only the time-grids with their zoomability can do so)
+ * - zooming on y-axis is allowed (no scroll otherwise)
+ * - slider bubble is large enough (no overdraw confusion)
+ * - scale is shown on the scroller
+ * (workaround to make sure that button windows don't show these,
+ * and only the time-grids with their zoomability can do so)
*/
if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0 &&
(v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) &&
@@ -1986,10 +1986,10 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
float fac, dfac, val;
/* the numbers: convert grid->starty and dy to scroll coordinates
- * - fac is y-coordinate to draw to
- * - dfac is gap between scale markings
- * - these involve a correction for horizontal scrollbar
- * NOTE: it's assumed that that scrollbar is there if this is involved!
+ * - fac is y-coordinate to draw to
+ * - dfac is gap between scale markings
+ * - these involve a correction for horizontal scrollbar
+ * NOTE: it's assumed that that scrollbar is there if this is involved!
*/
fac = (grid->starty - v2d->cur.ymin) / BLI_rctf_size_y(&v2d->cur);
fac = vert.ymin + fac * BLI_rcti_size_y(&vert);