diff options
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 14 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index a3b4cbe392c..a9bb3089175 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -2148,7 +2148,7 @@ static struct uiWidgetColors wcol_option = { 1, 15, -15, 0, - 0.2f, + 0.3333333f, }; /* button that shows popup */ @@ -3162,7 +3162,7 @@ static void ui_draw_but_HSV_v(uiBut *but, const rcti *rect) bTheme *btheme = UI_GetTheme(); uiWidgetColors *wcol = &btheme->tui.wcol_numslider; uiWidgetBase wtb; - const float rad = wcol->roundness * U.widget_unit; + const float rad = wcol->roundness * BLI_rcti_size_x(rect); float x, y; float rgb[3], hsv[3], v; bool color_profile = but->block->color_profile; @@ -3250,7 +3250,7 @@ static void ui_draw_separator(const rcti *rect, uiWidgetColors *wcol) static void widget_numbut_draw(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign, bool emboss) { uiWidgetBase wtb; - const float rad = wcol->roundness * U.widget_unit; + const float rad = wcol->roundness * BLI_rcti_size_y(rect); const int handle_width = min_ii(BLI_rcti_size_x(rect) / 3, BLI_rcti_size_y(rect) * 0.7f); if (state & UI_SELECT) @@ -3510,7 +3510,7 @@ static void widget_progressbar(uiBut *but, uiWidgetColors *wcol, rcti *rect, int /* round corners */ float value = but->a1; - float offs = wcol->roundness * U.widget_unit; + float offs = wcol->roundness * BLI_rcti_size_y(&rect_prog); float w = value * BLI_rcti_size_x(&rect_prog); /* ensure minimium size */ @@ -3546,7 +3546,7 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s /* backdrop first */ - offs = wcol->roundness * U.widget_unit; + offs = wcol->roundness * BLI_rcti_size_y(rect); toffs = offs * 0.75f; round_box_edges(&wtb, roundboxalign, rect, offs); @@ -3712,7 +3712,7 @@ static void widget_icon_has_anim(uiBut *but, uiWidgetColors *wcol, rcti *rect, i widget_init(&wtb); wtb.draw_outline = false; - rad = wcol->roundness * U.widget_unit; + rad = wcol->roundness * BLI_rcti_size_y(rect); round_box_edges(&wtb, UI_CNR_ALL, rect, rad); widgetbase_draw(&wtb, wcol); } @@ -3885,7 +3885,7 @@ static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int UN recttemp.xmax -= delta; recttemp.ymax -= delta; - rad = wcol->roundness * U.widget_unit; + rad = wcol->roundness * BLI_rcti_size_y(&recttemp); round_box_edges(&wtb, UI_CNR_ALL, &recttemp, rad); /* decoration */ diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 593d935e8f3..1bc834a121c 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -2966,7 +2966,7 @@ void init_userdef_do_versions(void) btheme->tui.wcol_tool.roundness = 0.2f; btheme->tui.wcol_text.roundness = 0.2f; btheme->tui.wcol_radio.roundness = 0.2f; - btheme->tui.wcol_option.roundness = 0.2f; + btheme->tui.wcol_option.roundness = 0.333333f; btheme->tui.wcol_toggle.roundness = 0.25f; btheme->tui.wcol_num.roundness = 0.5f; btheme->tui.wcol_numslider.roundness = 0.5f; |