Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYevgeny Makarov <jenkm>2020-02-25 17:06:51 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-02-25 17:13:25 +0300
commitfe3264fafd1c7c15e4c7cfc86d25a6500d01a820 (patch)
treeba40bbd17e711190031ce6683ebf3cbeccf3e824 /source/blender/windowmanager
parentb0786d069cee989a924338fd450f7b4d5e7f47ce (diff)
UI: fix wrong button padding on high DPI displays in a few places
Differential Revision: https://developer.blender.org/D6928
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c3
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c6
-rw-r--r--source/blender/windowmanager/intern/wm_splash_screen.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index eff5464c885..1775d9064d9 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -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);
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 6e5068aa6b4..bc519055af3 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -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);
diff --git a/source/blender/windowmanager/intern/wm_splash_screen.c b/source/blender/windowmanager/intern/wm_splash_screen.c
index 3603ce81654..7f6eebb95ab 100644
--- a/source/blender/windowmanager/intern/wm_splash_screen.c
+++ b/source/blender/windowmanager/intern/wm_splash_screen.c
@@ -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);