diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 09:12:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-14 09:21:34 +0300 |
commit | 55e719ec35a10c3f9e7231dee13d4b05aad7d965 (patch) | |
tree | 563ed5b1b27e9613de8384da90197ce2c3e1924b /source/blender/editors/interface | |
parent | c279f879ab86e03dff0dbfd3a36b14bebb4956f9 (diff) | |
parent | d7f55c4ff58f87b80f0ce2fa43ce2f7cd2b72675 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_ops.c | 6 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 6 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_templates.c | 12 | ||||
-rw-r--r-- | source/blender/editors/interface/view2d.c | 74 | ||||
-rw-r--r-- | source/blender/editors/interface/view2d_ops.c | 20 |
5 files changed, 59 insertions, 59 deletions
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 5be2b82af9e..d2bed210f9c 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -824,8 +824,8 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op)) txt = BKE_text_add(bmain, "Recent Reports"); /* convert entire list to a display string, and add this to the text-block - * - if commandline debug option enabled, show debug reports too - * - otherwise, up to info (which is what users normally see) + * - if commandline debug option enabled, show debug reports too + * - otherwise, up to info (which is what users normally see) */ str = BKE_reports_string(reports, (G.debug & G_DEBUG) ? RPT_DEBUG : RPT_INFO); @@ -1156,7 +1156,7 @@ static int edittranslation_exec(bContext *C, wmOperator *op) } /* Try to find a valid po file for current language... */ edittranslation_find_po_file(root, uilng, popath, FILE_MAX); -/* printf("po path: %s\n", popath);*/ + /* printf("po path: %s\n", popath); */ if (popath[0] == '\0') { BKE_reportf(op->reports, RPT_ERROR, "No valid po found for language '%s' under %s", uilng, root); return OPERATOR_CANCELLED; diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index aab580b49bd..4662d76a5e1 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -2382,9 +2382,9 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat if (state == PANEL_STATE_EXIT || state == PANEL_STATE_ANIMATION) { if (data && data->state != PANEL_STATE_ANIMATION) { /* XXX: - * - the panel tabbing function call below (test_add_new_tabs()) has been commented out - * "It is too easy to do by accident when reordering panels, - * is very hard to control and use, and has no real benefit." - BillRey + * - the panel tabbing function call below (test_add_new_tabs()) has been commented out + * "It is too easy to do by accident when reordering panels, + * is very hard to control and use, and has no real benefit." - BillRey * Aligorith, 2009Sep */ //test_add_new_tabs(ar); // also copies locations of tabs in dragged panel diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index f1c9a7d200e..5bdf8f45832 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -939,7 +939,7 @@ static void ui_template_id( template_ui->idlb = which_libbase(CTX_data_main(C), idcode); /* create UI elements for this template - * - template_ID makes a copy of the template data and assigns it to the relevant buttons + * - template_ID makes a copy of the template data and assigns it to the relevant buttons */ if (template_ui->idlb) { if (use_tabs) { @@ -3410,10 +3410,10 @@ void uiTemplateLayers( } /* the number of layers determines the way we group them - * - we want 2 rows only (for now) - * - the number of columns (cols) is the total number of buttons per row - * the 'remainder' is added to this, as it will be ok to have first row slightly wider if need be - * - for now, only split into groups if group will have at least 5 items + * - we want 2 rows only (for now) + * - the number of columns (cols) is the total number of buttons per row + * the 'remainder' is added to this, as it will be ok to have first row slightly wider if need be + * - for now, only split into groups if group will have at least 5 items */ layers = RNA_property_array_length(ptr, prop); cols = (layers / 2) + (layers % 2); @@ -4396,7 +4396,7 @@ eAutoPropButsReturn uiTemplateOperatorPropertyButs( /* only for popups, see [#36109] */ /* if button is operator's default property, and a text-field, enable focus for it - * - this is used for allowing operators with popups to rename stuff with fewer clicks + * - this is used for allowing operators with popups to rename stuff with fewer clicks */ if (is_popup) { if ((but->rnaprop == op->type->prop) && (but->type == UI_BTYPE_TEXT)) { 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); diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index 81632b48c80..62bc7e87f0e 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -1157,7 +1157,7 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, const wmEvent *event vzd->dy += dy; /* store mouse coordinates for next time, if not doing continuous zoom - * - continuous zoom only depends on distance of mouse to starting point to determine rate of change + * - continuous zoom only depends on distance of mouse to starting point to determine rate of change */ if (U.viewzoom != USER_ZOOM_CONT) { // XXX store this setting as RNA prop? vzd->lastx = event->x; @@ -1249,9 +1249,9 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op) if (zoom_in) { /* zoom in: - * - 'cur' rect will be defined by the coordinates of the border region - * - just set the 'cur' rect to have the same coordinates as the border region - * if zoom is allowed to be changed + * - 'cur' rect will be defined by the coordinates of the border region + * - just set the 'cur' rect to have the same coordinates as the border region + * if zoom is allowed to be changed */ if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) { cur_new.xmin = rect.xmin; @@ -1264,9 +1264,9 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op) } else { /* zoom out: - * - the current 'cur' rect coordinates are going to end up where the 'rect' ones are, - * but the 'cur' rect coordinates will need to be adjusted to take in more of the view - * - calculate zoom factor, and adjust using center-point + * - the current 'cur' rect coordinates are going to end up where the 'rect' ones are, + * but the 'cur' rect coordinates will need to be adjusted to take in more of the view + * - calculate zoom factor, and adjust using center-point */ float zoom, center, size; @@ -1636,8 +1636,8 @@ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_ bool in_min, in_max, in_bar, out_min, out_max, in_view = 1; /* firstly, check if - * - 'bubble' fills entire scroller - * - 'bubble' completely out of view on either side + * - 'bubble' fills entire scroller + * - 'bubble' completely out of view on either side */ if ((sh_min <= sc_min) && (sh_max >= sc_max)) in_view = 0; if (sh_min == sh_max) { @@ -1715,7 +1715,7 @@ static void scroller_activate_init(bContext *C, wmOperator *op, const wmEvent *e vsm->lastx = event->x; vsm->lasty = event->y; /* 'zone' depends on where mouse is relative to bubble - * - zooming must be allowed on this axis, otherwise, default to pan + * - zooming must be allowed on this axis, otherwise, default to pan */ scrollers = UI_view2d_scrollers_calc(C, v2d, NULL, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY); |