diff options
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index e8782a744bf..6820493132b 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -3900,7 +3900,7 @@ static void radial_control_set_initial_mouse(RadialControl *rc, const wmEvent *e d[0] = rc->initial_value * U.pixelsize; break; case PROP_PERCENTAGE: - d[0] = (100.0f - rc->initial_value) / 100.0f * WM_RADIAL_CONTROL_DISPLAY_WIDTH + WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE; + d[0] = (rc->initial_value) / 100.0f * WM_RADIAL_CONTROL_DISPLAY_WIDTH + WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE; break; case PROP_FACTOR: d[0] = (1 - rc->initial_value) * WM_RADIAL_CONTROL_DISPLAY_WIDTH + WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE; @@ -4014,7 +4014,7 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd alpha = 0.75; break; case PROP_PERCENTAGE: - r1 = (100.0f - rc->current_value) / 100.0f * WM_RADIAL_CONTROL_DISPLAY_WIDTH + WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE; + r1 = rc->current_value / 100.0f * WM_RADIAL_CONTROL_DISPLAY_WIDTH + WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE; r2 = tex_radius = WM_RADIAL_CONTROL_DISPLAY_SIZE; rmin = WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE; BLI_snprintf(str, WM_RADIAL_MAX_STR, "%3.1f%%", rc->current_value); @@ -4462,7 +4462,7 @@ static int radial_control_modal(bContext *C, wmOperator *op, const wmEvent *even new_value /= U.pixelsize; break; case PROP_PERCENTAGE: - new_value = ((WM_RADIAL_CONTROL_DISPLAY_SIZE - dist) / WM_RADIAL_CONTROL_DISPLAY_WIDTH) * 100.0f; + new_value = ((dist - WM_RADIAL_CONTROL_DISPLAY_MIN_SIZE) / WM_RADIAL_CONTROL_DISPLAY_WIDTH) * 100.0f; if (snap) new_value = ((int)(new_value + 2.5)) / 5 * 5; break; case PROP_FACTOR: |