UI: Center the Status Bar Progress Text

This patch horizontally centers the text inside the progress bar
widget. It is currently left-aligned and offset to the middle, which
doesn't center properly.

see D11205 for details and examples.

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

Reviewed by Julian Eisel
This commit is contained in:
Vincent Blankfield 2021-07-06 12:17:42 -07:00 committed by Harley Acheson
parent 46a261e108
commit 4a24c6fe37
2 changed files with 0 additions and 5 deletions

View File

@ -4106,7 +4106,6 @@ static uiBut *ui_def_but(uiBlock *block,
UI_BTYPE_BLOCK,
UI_BTYPE_BUT_MENU,
UI_BTYPE_SEARCH_MENU,
UI_BTYPE_PROGRESS_BAR,
UI_BTYPE_DATASETROW,
UI_BTYPE_POPOVER)) {
but->drawflag |= (UI_BUT_TEXT_LEFT | UI_BUT_ICON_LEFT);

View File

@ -3720,10 +3720,6 @@ static void widget_progressbar(
/* "slider" bar color */
copy_v3_v3_uchar(wcol->inner, wcol->item);
widgetbase_draw(&wtb_bar, wcol);
/* raise text a bit */
rect->xmin += (BLI_rcti_size_x(&rect_prog) / 2);
rect->xmax += (BLI_rcti_size_x(&rect_prog) / 2);
}
static void widget_datasetrow(