UI: fix wrong button padding on high DPI displays in a few places

Differential Revision: https://developer.blender.org/D6928
This commit is contained in:
Yevgeny Makarov 2020-02-25 15:06:51 +01:00 committed by Brecht Van Lommel
parent b0786d069c
commit fe3264fafd
4 changed files with 9 additions and 8 deletions

View File

@ -396,7 +396,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
NODE_WIDTH(node) - NODE_DY,
NODE_DY,
0,
UI_style_get());
UI_style_get_dpi());
if (node->flag & NODE_MUTED) {
uiLayoutSetActive(layout, false);
@ -491,7 +491,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
node->butr.xmax,
0,
0,
UI_style_get());
UI_style_get_dpi());
if (node->flag & NODE_MUTED) {
uiLayoutSetActive(layout, false);
@ -523,7 +523,7 @@ static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
NODE_WIDTH(node) - NODE_DY,
NODE_DY,
0,
UI_style_get());
UI_style_get_dpi());
if (node->flag & NODE_MUTED) {
uiLayoutSetActive(layout, false);

View File

@ -2808,7 +2808,7 @@ static uiBlock *block_create_autorun_warning(struct bContext *C,
void *UNUSED(arg1))
{
wmWindowManager *wm = CTX_wm_manager(C);
uiStyle *style = UI_style_get();
uiStyle *style = UI_style_get_dpi();
uiBlock *block = UI_block_begin(C, ar, "autorun_warning_popup", UI_EMBOSS);
UI_block_flag_enable(
@ -3067,6 +3067,7 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C, struct ARegi
/* Create dialog */
uiBlock *block = UI_block_begin(C, ar, close_file_dialog_name, UI_EMBOSS);
style = UI_style_get_dpi();
UI_block_flag_enable(
block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_LOOP | UI_BLOCK_NO_WIN_CLIP | UI_BLOCK_NUMSELECT);

View File

@ -1319,7 +1319,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
wmOperator *op = arg_op;
uiBlock *block;
uiLayout *layout;
uiStyle *style = UI_style_get();
uiStyle *style = UI_style_get_dpi();
int width = 15 * UI_UNIT_X;
block = UI_block_begin(C, ar, __func__, UI_EMBOSS);
@ -1401,7 +1401,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData)
wmOperator *op = data->op;
uiBlock *block;
uiLayout *layout;
uiStyle *style = UI_style_get();
uiStyle *style = UI_style_get_dpi();
block = UI_block_begin(C, ar, __func__, UI_EMBOSS);
UI_block_flag_disable(block, UI_BLOCK_LOOP);
@ -1450,7 +1450,7 @@ static uiBlock *wm_operator_ui_create(bContext *C, ARegion *ar, void *userData)
wmOperator *op = data->op;
uiBlock *block;
uiLayout *layout;
uiStyle *style = UI_style_get();
uiStyle *style = UI_style_get_dpi();
block = UI_block_begin(C, ar, __func__, UI_EMBOSS);
UI_block_flag_disable(block, UI_BLOCK_LOOP);

View File

@ -259,7 +259,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
{
uiBlock *block;
uiBut *but;
uiStyle *style = UI_style_get();
uiStyle *style = UI_style_get_dpi();
block = UI_block_begin(C, ar, "splash", UI_EMBOSS);