Fix floating panel (HUD) applying DPI incorrectly

ARegion.sizex/y should never have DPI factor applied. For regular panel
regions, DPI will be applied in region_rect_recursive already, causing
it to be applied twice when region size is set dynamically (= based on
content dimensions).
This commit is contained in:
Julian Eisel
2018-12-23 22:31:04 +01:00
parent 59b530ca18
commit e5e885d0ec
2 changed files with 7 additions and 7 deletions

View File

@@ -188,8 +188,8 @@ static void hud_region_layout(const bContext *C, ARegion *ar)
if (ar->panels.first && (ar->sizey != size_y)) {
View2D *v2d = &ar->v2d;
ar->winx = ar->sizex;
ar->winy = ar->sizey;
ar->winx = ar->sizex * UI_DPI_FAC;
ar->winy = ar->sizey * UI_DPI_FAC;
ar->winrct.xmax = (ar->winrct.xmin + ar->winx) - 1;
ar->winrct.ymax = (ar->winrct.ymin + ar->winy) - 1;