diff options
author | Yevgeny Makarov <jenkm> | 2021-02-21 19:26:55 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-02-21 19:32:33 +0300 |
commit | 0c62906a4145b242d5ed772209038f65d7b493a8 (patch) | |
tree | 65964e982e03708eb3b3e7197948a021e8aa30f1 /release | |
parent | 08dbc4f996e4e95f3ab64f7bb3e1193700c585f5 (diff) |
UI: Correct the text alignment in the quick setup (splash screen) dialog
The "quick setup" dialog is actually a 'menu', and the "splash screen" block
contains the UI_BLOCK_LOOP flag which causes the buttons' text to align
to the left, however, usually regular buttons have centered text.
As a workaround, add the UI_BLOCK_QUICK_SETUP flag which prevents
the text from being left-aligned.
Differential Revision: https://developer.blender.org/D10486
Reviewed by: Julian Eisel
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index db15f4597bf..3b94a964148 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -2479,10 +2479,10 @@ class WM_OT_batch_rename(Operator): return wm.invoke_props_dialog(self, width=400) -class WM_MT_splash(Menu): - bl_label = "Splash" +class WM_MT_splash_quick_setup(Menu): + bl_label = "Quick Setup" - def draw_setup(self, context): + def draw(self, context): wm = context.window_manager # prefs = context.preferences @@ -2570,18 +2570,11 @@ class WM_MT_splash(Menu): layout.separator() layout.separator() - def draw(self, context): - # Draw setup screen if no preferences have been saved yet. - import os - userconfig_path = bpy.utils.user_resource('CONFIG') - userdef_path = os.path.join(userconfig_path, "userpref.blend") - - if not os.path.isfile(userdef_path): - self.draw_setup(context) - return +class WM_MT_splash(Menu): + bl_label = "Splash" - # Pass + def draw(self, context): layout = self.layout layout.operator_context = 'EXEC_DEFAULT' layout.emboss = 'PULLDOWN_MENU' @@ -2730,6 +2723,7 @@ classes = ( WM_OT_toolbar_prompt, BatchRenameAction, WM_OT_batch_rename, + WM_MT_splash_quick_setup, WM_MT_splash, WM_MT_splash_about, ) |