diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 3c3f7628ade..8687d1c175d 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -1453,7 +1453,6 @@ enum { enum eButProgressType { UI_BUT_PROGRESS_TYPE_BAR = 0, UI_BUT_PROGRESS_TYPE_RING = 1, - UI_BUT_PROGRESS_TYPE_PIE = 2, }; /***************************** ID Utilities *******************************/ diff --git a/source/blender/editors/interface/interface_layout.cc b/source/blender/editors/interface/interface_layout.cc index d9b837dd55f..761eecda317 100644 --- a/source/blender/editors/interface/interface_layout.cc +++ b/source/blender/editors/interface/interface_layout.cc @@ -3510,7 +3510,7 @@ void uiItemProgressIndicator(uiLayout *layout, 0, ""); - if (has_text && ELEM(progress_type, UI_BUT_PROGRESS_TYPE_RING, UI_BUT_PROGRESS_TYPE_PIE)) { + if (has_text && (progress_type == UI_BUT_PROGRESS_TYPE_RING)) { /* For progress bar, centered is okay, left aligned for ring/pie. */ but->drawflag |= UI_BUT_TEXT_LEFT; } diff --git a/source/blender/editors/interface/interface_widgets.cc b/source/blender/editors/interface/interface_widgets.cc index 9807269e25f..4a047dee0a1 100644 --- a/source/blender/editors/interface/interface_widgets.cc +++ b/source/blender/editors/interface/interface_widgets.cc @@ -3640,11 +3640,11 @@ static void widget_progress_type_bar(uiButProgress *but_progress, /** * Used for both ring & pie types. */ -static void widget_progress_type_circle(uiButProgress *but_progress, - uiWidgetColors *wcol, - rcti *rect, - const float ring_width) +static void widget_progress_type_ring(uiButProgress *but_progress, + uiWidgetColors *wcol, + rcti *rect) { + const float ring_width = 0.6; /* 0.0 would be a pie. */ const float outer_rad = (rect->ymax - rect->ymin) / 2.0f; const float inner_rad = outer_rad * ring_width; const float x = rect->xmin + outer_rad; @@ -3687,12 +3687,8 @@ static void widget_progress_indicator(uiBut *but, widget_progress_type_bar(but_progress, wcol, rect, roundboxalign, zoom); break; } - case UI_BUT_PROGRESS_TYPE_PIE: { - widget_progress_type_circle(but_progress, wcol, rect, 0.6f); - break; - } case UI_BUT_PROGRESS_TYPE_RING: { - widget_progress_type_circle(but_progress, wcol, rect, 0.0f); + widget_progress_type_ring(but_progress, wcol, rect); break; } } diff --git a/source/blender/makesrna/intern/rna_ui_api.cc b/source/blender/makesrna/intern/rna_ui_api.cc index a9475685680..6997e4dae19 100644 --- a/source/blender/makesrna/intern/rna_ui_api.cc +++ b/source/blender/makesrna/intern/rna_ui_api.cc @@ -959,7 +959,6 @@ void RNA_api_ui_layout(StructRNA *srna) static const EnumPropertyItem progress_type_items[] = { {UI_BUT_PROGRESS_TYPE_BAR, "BAR", 0, "Bar", ""}, {UI_BUT_PROGRESS_TYPE_RING, "RING", 0, "Ring", ""}, - {UI_BUT_PROGRESS_TYPE_PIE, "PIE", 0, "Pie", ""}, {0, nullptr, 0, nullptr, nullptr}, };