[Bf-blender-cvs] [45e16a6c966] master: UI: Remove extra padding around curve widget

Leon Leno noreply at git.blender.org
Fri Oct 15 20:31:20 CEST 2021


Commit: 45e16a6c966eb0383d24840fd0fcd1314435eb54
Author: Leon Leno
Date:   Fri Oct 15 13:30:50 2021 -0500
Branches: master
https://developer.blender.org/rB45e16a6c966eb0383d24840fd0fcd1314435eb54

UI: Remove extra padding around curve widget

This commit removes the constant padding around to the left and
right of the curve widget. The padding worked in screen space and
didn't take UI scale/zoom into account. This makes the curve widget
consistent with the more recently added curve profile widget used
for bevel profiles.

Differential Revision: https://developer.blender.org/D12883

===================================================================

M	source/blender/editors/interface/interface_widgets.c

===================================================================

diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 6727d812e1e..a26d409037d 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -4831,9 +4831,6 @@ void ui_draw_but(const bContext *C, struct ARegion *region, uiStyle *style, uiBu
         break;
 
       case UI_BTYPE_CURVE:
-        /* do not draw right to edge of rect */
-        rect->xmin += (0.2f * UI_UNIT_X);
-        rect->xmax -= (0.2f * UI_UNIT_X);
         ui_draw_but_CURVE(region, but, &tui->wcol_regular, rect);
         break;



More information about the Bf-blender-cvs mailing list