Fix T64463: Visual Artifacts with ColorRamp
This patch fixes an issue with the ColorRamp overflowing its drawing bounds Differential Revision: https://developer.blender.org/D4843 Reviewed by Brecht Van Lommel
This commit is contained in:
Submodule release/scripts/addons updated: fa8787a67e...20f59bfd2b
Submodule release/scripts/addons_contrib updated: f72ec13e35...2e2931867a
@@ -1599,8 +1599,8 @@ void ui_draw_but_COLORBAND(uiBut *but, const uiWidgetColors *UNUSED(wcol), const
|
||||
return;
|
||||
}
|
||||
|
||||
float x1 = rect->xmin + (0.25f * UI_UNIT_X);
|
||||
float sizex = rect->xmax - x1 - (0.30f * UI_UNIT_X);
|
||||
float x1 = rect->xmin;
|
||||
float sizex = rect->xmax - x1;
|
||||
float sizey = BLI_rcti_size_y(rect);
|
||||
float sizey_solid = sizey * 0.25f;
|
||||
float y1 = rect->ymin;
|
||||
|
||||
@@ -4645,6 +4645,9 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
|
||||
break;
|
||||
|
||||
case UI_BTYPE_COLORBAND:
|
||||
/* do not draw right to edge of rect */
|
||||
rect->xmin += (0.25f * UI_UNIT_X);
|
||||
rect->xmax -= (0.3f * UI_UNIT_X);
|
||||
ui_draw_but_COLORBAND(but, &tui->wcol_regular, rect);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user