UI: Minimum Width for Large Confirmation Dialogs #119978
|
@ -1681,8 +1681,12 @@ int WM_operator_confirm_ex(bContext *C,
|
|||
{
|
||||
wmOpPopUp *data = MEM_new<wmOpPopUp>(__func__);
|
||||
data->op = op;
|
||||
data->width = int(180.0f * UI_SCALE_FAC * UI_style_get()->widgetlabel.points /
|
||||
|
||||
/* Larger dialog needs a wider minimum width to balance with the big icon. */
|
||||
const float min_width = (message == nullptr) ? 180.0f : 230.0f;
|
||||
data->width = int(min_width * UI_SCALE_FAC * UI_style_get()->widgetlabel.points /
|
||||
UI_DEFAULT_TEXT_POINTS);
|
||||
|
||||
data->free_op = true;
|
||||
data->title = (title == nullptr) ? WM_operatortype_name(op->type, op->ptr) : title;
|
||||
data->message = (message == nullptr) ? std::string() : message;
|
||||
|
|
Loading…
Reference in New Issue