Fix T51248: user preferences window size not adapted to DPI.
This commit is contained in:
@@ -1799,13 +1799,13 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
|
||||
if (version_suffix != NULL && version_suffix[0]) {
|
||||
/* placed after the version number in the image,
|
||||
* placing y is tricky to match baseline */
|
||||
int x = 260 - (2 * UI_DPI_WINDOW_FAC);
|
||||
int y = 242 + (4 * UI_DPI_WINDOW_FAC);
|
||||
int w = 240;
|
||||
int x = 260 * U.pixelsize - (2 * UI_DPI_FAC);
|
||||
int y = 242 * U.pixelsize + (4 * UI_DPI_FAC);
|
||||
int w = 240 * U.pixelsize;
|
||||
|
||||
/* hack to have text draw 'text_sel' */
|
||||
UI_block_emboss_set(block, UI_EMBOSS_NONE);
|
||||
but = uiDefBut(block, UI_BTYPE_LABEL, 0, version_suffix, x * U.pixelsize, y * U.pixelsize, w * U.pixelsize, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
|
||||
but = uiDefBut(block, UI_BTYPE_LABEL, 0, version_suffix, x, y, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
|
||||
/* XXX, set internal flag - UI_SELECT */
|
||||
UI_but_flag_enable(but, 1);
|
||||
UI_block_emboss_set(block, UI_EMBOSS);
|
||||
|
||||
Reference in New Issue
Block a user