diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-03-08 06:48:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-03-08 06:54:23 +0300 |
commit | a1bc7729f20b8a8250f938d768ab2d104c41af54 (patch) | |
tree | 733edf2a4be6eef6dc1dcd8f82f108aeeb9b3940 /source/blender/editors/interface/interface_widgets.c | |
parent | b4f5128b21f1e1348defc68a96f4d4c2b1053fbe (diff) |
Cleanup: use ofs instead of offs as an abbreviation for offset
Used for local structs/variables,
since `ofs` is by far the most widely used abbreviation.
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 06b87dd857f..1d7d10b6d0c 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -3667,16 +3667,16 @@ static void widget_progressbar( /* round corners */ const float value = but_progressbar->progress; - const float offs = wcol->roundness * BLI_rcti_size_y(&rect_prog); + const float ofs = wcol->roundness * BLI_rcti_size_y(&rect_prog); float w = value * BLI_rcti_size_x(&rect_prog); /* Ensure minimum size. */ - w = MAX2(w, offs); + w = MAX2(w, ofs); rect_bar.xmax = rect_bar.xmin + w; - round_box_edges(&wtb, roundboxalign, &rect_prog, offs); - round_box_edges(&wtb_bar, roundboxalign, &rect_bar, offs); + round_box_edges(&wtb, roundboxalign, &rect_prog, ofs); + round_box_edges(&wtb_bar, roundboxalign, &rect_bar, ofs); wtb.draw_outline = true; widgetbase_draw(&wtb, wcol); @@ -3733,9 +3733,9 @@ static void widget_numslider( widget_init(&wtb1); /* Backdrop first. */ - const float offs = wcol->roundness * BLI_rcti_size_y(rect); - const float toffs = offs * 0.75f; - round_box_edges(&wtb, roundboxalign, rect, offs); + const float ofs = wcol->roundness * BLI_rcti_size_y(rect); + const float toffs = ofs * 0.75f; + round_box_edges(&wtb, roundboxalign, rect, ofs); wtb.draw_outline = false; widgetbase_draw(&wtb, wcol); @@ -3768,13 +3768,13 @@ static void widget_numslider( const float width = (float)BLI_rcti_size_x(rect); factor_ui = factor * width; - if (factor_ui <= offs) { + if (factor_ui <= ofs) { /* Left part only. */ roundboxalign_slider &= ~(UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT); - rect1.xmax = rect1.xmin + offs; - factor_discard = factor_ui / offs; + rect1.xmax = rect1.xmin + ofs; + factor_discard = factor_ui / ofs; } - else if (factor_ui <= width - offs) { + else if (factor_ui <= width - ofs) { /* Left part + middle part. */ roundboxalign_slider &= ~(UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT); rect1.xmax = rect1.xmin + factor_ui; @@ -3784,7 +3784,7 @@ static void widget_numslider( factor_discard = factor; } - round_box_edges(&wtb1, roundboxalign_slider, &rect1, offs); + round_box_edges(&wtb1, roundboxalign_slider, &rect1, ofs); wtb1.draw_outline = false; widgetbase_set_uniform_discard_factor(&wtb1, factor_discard); widgetbase_draw(&wtb1, wcol); |