diff --git a/src/calibre/gui2/preferences/template_functions.py b/src/calibre/gui2/preferences/template_functions.py
index 5f39e25586..15c03e71c6 100644
--- a/src/calibre/gui2/preferences/template_functions.py
+++ b/src/calibre/gui2/preferences/template_functions.py
@@ -221,7 +221,10 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
self.st_previous_text = ''
self.st_first_time = False
- self.st_button_layout.insertSpacing(0, 90)
+ # Attempt to properly align the buttons with the template edit widget
+ self.st_button_layout.insertSpacing(0, 70)
+ self.st_button_layout.insertSpacing(self.st_button_layout.indexOf(self.st_doc_edit_button), 60)
+ self.st_button_layout.insertSpacing(self.st_button_layout.indexOf(self.st_test_template_button), 50)
self.template_editor.new_doc.setFixedHeight(50)
# get field metadata and selected books
diff --git a/src/calibre/gui2/preferences/template_functions.ui b/src/calibre/gui2/preferences/template_functions.ui
index 77f0f0a3eb..4d17e4b51a 100644
--- a/src/calibre/gui2/preferences/template_functions.ui
+++ b/src/calibre/gui2/preferences/template_functions.ui
@@ -45,6 +45,9 @@
&Clear
+
+ Clear the name, template, and documentation boxes
+
-
@@ -52,6 +55,10 @@
D&elete
+
+ <p>Delete the current stored template. The name is cleared. The template
+and documentation are not cleared to make it easier to store the template under a new name</p>
+
-
@@ -59,6 +66,9 @@
&Replace
+
+ Replace the template and documentation for the template with the given name.
+
-
@@ -66,6 +76,10 @@
C&reate
+
+ <p>Create a new stored template with the given name. You must enter the template
+text before pushing this button.</p>
+
-
@@ -73,6 +87,13 @@
Im&port
+
+ <p>Import a stored template from a file created by the Export
+function. The import includes the name, the template, and the documentation.</p><p>
+If a stored template with the imported name already exists then you are asked if you want to replace its
+program and documentation with what is in the file.</p><p>
+After the import, press the Create or Replace button as appropriate to save the changes.</p>
+
-
@@ -80,21 +101,12 @@
E&xport
+
+ <p>Export the current stored template to a file. The file contains
+the name, the template, and the documentation.</p>
+
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 0
-
-
-
-
-
@@ -105,19 +117,6 @@
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 0
-
-
-
-
-
@@ -136,7 +135,7 @@
20
- 0
+ 10