UI: adjust preferences save/revert button layout
authorCampbell Barton <ideasman42@gmail.com>
Tue, 14 May 2019 22:55:36 +0000 (08:55 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 14 May 2019 22:57:44 +0000 (08:57 +1000)
Also add description for factory preferences.

release/scripts/startup/bl_ui/space_userpref.py
source/blender/windowmanager/intern/wm_files.c

index bec6429..ca2d616 100644 (file)
@@ -34,16 +34,13 @@ class USERPREF_HT_header(Header):
     def draw_buttons(layout, context, *, is_vertical=False):
         prefs = context.preferences
 
-        if is_vertical:
-            sub = layout.column(align=True)
-        else:
-            sub = layout.row(align=True)
+        row = layout.row()
 
-        sub.operator("wm.save_userpref")
-        sub_revert = sub.row(align=True)
-        sub_revert.active = prefs.is_dirty
-        sub_revert.operator("wm.read_userpref", text="Revert Preferences")
-        sub.operator("wm.read_factory_userpref", text="Load Factory Preferences")
+        row.operator("wm.save_userpref", text="Save")
+        row_revert = row.row(align=True)
+        row_revert.active = prefs.is_dirty
+        row_revert.operator("wm.read_userpref", text="Revert")
+        layout.operator("wm.read_factory_userpref", text="Load Factory Settings")
 
         layout.prop(prefs, "use_preferences_save")
 
index 70bbf9a..304daa2 100644 (file)
@@ -1820,6 +1820,7 @@ void WM_OT_read_factory_userpref(wmOperatorType *ot)
 {
   ot->name = "Load Factory Preferences";
   ot->idname = "WM_OT_read_factory_userpref";
+  ot->description = "Load default preferences";
 
   ot->invoke = WM_operator_confirm;
   ot->exec = wm_userpref_read_exec;