Stored templates preferences:

- Add some tooltips
- Improve button alignment.
This commit is contained in:
Charles Haley 2024-12-19 12:55:00 +00:00
parent 801a4c1b16
commit e52ba6a93c
2 changed files with 30 additions and 28 deletions

View File

@ -221,7 +221,10 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
self.st_previous_text = '' self.st_previous_text = ''
self.st_first_time = False 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) self.template_editor.new_doc.setFixedHeight(50)
# get field metadata and selected books # get field metadata and selected books

View File

@ -45,6 +45,9 @@
<property name="text"> <property name="text">
<string>&amp;Clear</string> <string>&amp;Clear</string>
</property> </property>
<property name="toolTip">
<string>Clear the name, template, and documentation boxes</string>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -52,6 +55,10 @@
<property name="text"> <property name="text">
<string>D&amp;elete</string> <string>D&amp;elete</string>
</property> </property>
<property name="toolTip">
<string>&lt;p&gt;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&lt;/p&gt;</string>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -59,6 +66,9 @@
<property name="text"> <property name="text">
<string>&amp;Replace</string> <string>&amp;Replace</string>
</property> </property>
<property name="toolTip">
<string>Replace the template and documentation for the template with the given name.</string>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -66,6 +76,10 @@
<property name="text"> <property name="text">
<string>C&amp;reate</string> <string>C&amp;reate</string>
</property> </property>
<property name="toolTip">
<string>&lt;p&gt;Create a new stored template with the given name. You must enter the template
text before pushing this button.&lt;/p&gt;</string>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -73,6 +87,13 @@
<property name="text"> <property name="text">
<string>Im&amp;port</string> <string>Im&amp;port</string>
</property> </property>
<property name="toolTip">
<string>&lt;p&gt;Import a stored template from a file created by the Export
function. The import includes the name, the template, and the documentation.&lt;/p&gt;&lt;p&gt;
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.&lt;/p&gt;&lt;p&gt;
After the import, press the Create or Replace button as appropriate to save the changes.&lt;/p&gt;</string>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -80,21 +101,12 @@
<property name="text"> <property name="text">
<string>E&amp;xport</string> <string>E&amp;xport</string>
</property> </property>
<property name="toolTip">
<string>&lt;p&gt;Export the current stored template to a file. The file contains
the name, the template, and the documentation.&lt;/p&gt;</string>
</property>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QPushButton" name="st_doc_edit_button"> <widget class="QPushButton" name="st_doc_edit_button">
<property name="text"> <property name="text">
@ -105,19 +117,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="verticalSpacer_22">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QPushButton" name="st_test_template_button"> <widget class="QPushButton" name="st_test_template_button">
<property name="text"> <property name="text">
@ -136,7 +135,7 @@
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>0</height> <height>10</height>
</size> </size>
</property> </property>
</spacer> </spacer>