[Bf-blender-cvs] [e33fc3c37ba] master: UI: layout padding changes to autorun dialog, to match save dialog

Yevgeny Makarov noreply at git.blender.org
Fri Aug 23 18:44:59 CEST 2019


Commit: e33fc3c37ba71e6a066dac9faa615909893f895a
Author: Yevgeny Makarov
Date:   Fri Aug 23 18:41:25 2019 +0200
Branches: master
https://developer.blender.org/rBe33fc3c37ba71e6a066dac9faa615909893f895a

UI: layout padding changes to autorun dialog, to match save dialog

Differential Revision: https://developer.blender.org/D5568

===================================================================

M	source/blender/windowmanager/intern/wm_files.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index d17fb84e3d3..8215988c849 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -2836,6 +2836,12 @@ static uiBlock *block_create_autorun_warning(struct bContext *C,
   /* Buttons */
   uiBut *but;
   uiLayout *split = uiLayoutSplit(layout, 0.0f, true);
+  uiLayoutSetScaleY(split, 1.2f);
+
+  /* empty space */
+  col = uiLayoutColumn(split, false);
+  uiItemS(col);
+
   col = uiLayoutColumn(split, false);
 
   /* Allow reload if we have a saved file.
@@ -2876,12 +2882,10 @@ static uiBlock *block_create_autorun_warning(struct bContext *C,
                            TIP_("Enable scripts"));
     UI_but_func_set(but, wm_block_autorun_warning_enable_scripts, block, NULL);
   }
+  UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
 
-  /* empty space between buttons */
-  col = uiLayoutColumn(split, false);
-  uiItemS(col);
 
-  col = uiLayoutColumn(split, 1);
+  col = uiLayoutColumn(split, false);
   but = uiDefIconTextBut(block,
                          UI_BTYPE_BUT,
                          0,
@@ -2898,8 +2902,10 @@ static uiBlock *block_create_autorun_warning(struct bContext *C,
                          0,
                          TIP_("Continue using file without Python scripts"));
   UI_but_func_set(but, wm_block_autorun_warning_ignore, block, NULL);
+  UI_but_drawflag_disable(but, UI_BUT_TEXT_LEFT);
+  UI_but_flag_enable(but, UI_BUT_ACTIVE_DEFAULT);
 
-  UI_block_bounds_set_centered(block, 10);
+  UI_block_bounds_set_centered(block, 14 * U.dpi_fac);
 
   return block;
 }



More information about the Bf-blender-cvs mailing list