From 0c62906a4145b242d5ed772209038f65d7b493a8 Mon Sep 17 00:00:00 2001 From: Yevgeny Makarov Date: Sun, 21 Feb 2021 17:26:55 +0100 Subject: 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 --- release/scripts/startup/bl_operators/wm.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'release/scripts/startup') 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, ) -- cgit v1.2.3