Page MenuHome

window_manager.invoke_popup() does not respect preferences.view.ui_scale
Closed, ResolvedPublic


System Information
Operating system: Windows 7 (64 bit)
Graphics card: Radeon HD 8670D

Blender Version
Broken: 2.80, 69b2f5268114, blender2.7, 2019-02-10, as found on the splash screen

Short description of error
window_manager.invoke_popup() ignores preferences.view.ui_scale (window_manager.invoke_props_dialog() respects it).
In other words, the size of dialogs created with window_manager.invoke_popup() doesn't scale with the rest of the UI.

Exact steps for others to reproduce the error
Open the attached file

and run the script. Then change use_popup in the script to True and run again.
The size of the displayed dialogs (apart from the extra "OK" button) at a given UI scale should be the same, but it isn't.

Event Timeline

@dima glib (dairin0d), could you add one or two screenshots please? I see an issue where the checkbox suddenly gets larger when I click it, but I'm not sure if we are talking about the same thing.

Sebastian Parborg (zeddb) triaged this task as Needs Information from User priority.Feb 12 2019, 11:37 AM

I'm talking about the size of the dialog box (width, height).

In the attached illustration, the width of the invoke_popup() and invoke_props_dialog() is the same at ui_scale = 1.0 ("Resolution Scale" in user preferences).
However, when ui_scale is not 1.0, the invoke_props_dialog() scales accordingly while invoke_popup() does not. E.g. at ui_scale = 2.0 the dialog created by invoke_popup() is half the size of the invoke_props_dialog().

It's just a matter of (width, height) arguments of invoke_popup() not being multiplied by the ui_scale.

Jacques Lucke (JacquesLucke) raised the priority of this task from Needs Information from User to Confirmed, Medium.Feb 12 2019, 12:51 PM