Fix T61430: invoke_popup() does not respect ui scale
authorJacques Lucke <mail@jlucke.com>
Tue, 12 Feb 2019 12:30:24 +0000 (13:30 +0100)
committerJacques Lucke <mail@jlucke.com>
Tue, 12 Feb 2019 12:30:24 +0000 (13:30 +0100)
Reviewers: brecht

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

source/blender/windowmanager/intern/wm_operators.c

index 37a0c11..bc94eaa 100644 (file)
@@ -1212,8 +1212,8 @@ int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height)
 {
        wmOpPopUp *data = MEM_callocN(sizeof(wmOpPopUp), "WM_operator_ui_popup");
        data->op = op;
-       data->width = width;
-       data->height = height;
+       data->width = width * U.dpi_fac;
+       data->height = height * U.dpi_fac;
        data->free_op = true; /* if this runs and gets registered we may want not to free it */
        UI_popup_block_ex(C, wm_operator_ui_create, NULL, wm_operator_ui_popup_cancel, data, op);
        return OPERATOR_RUNNING_MODAL;