View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0017916 | Scribus | User Interface | public | 2026-08-09 04:36 | 2026-08-09 13:42 |
| Reporter | qirat | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | N/A |
| Status | new | Resolution | open | ||
| Platform | Linux | OS | Fedora Workstation | OS Version | 44 |
| Product Version | 1.7.4.svn | ||||
| Summary | 0017916: [PATCH] 2_Notes Styles Editor: UI redesign — layout, sizing, icons, mnemonics | ||||
| Description | [Patch 2 of 3] AI was big help here. Suggested it must be 2nd in the sequence. General visual and usability overhaul of the Notes Styles Editor dialog. Splits the former dual-purpose Apply/OK buttons (which relabelled themselves depending on mode) into dedicated Add Style/Cancel/Save Changes/Delete buttons; reorganises field alignment, spacing, and group layout (Numbering, Marks & Styles, Frame Behaviour); adds icons (including colour-coded confirm/cancel icons) and tooltips throughout; adds Alt-key mnemonics; reduces overall dialog width. No functional/logic changes to how notes styles are read, saved, or validated — cosmetic and layout only. | ||||
| Tags | No tags attached. | ||||
| Attached Files | notesstyleseditor_B_ui_changes.patch (48,515 bytes)
Index: scribus/ui/notesstyleseditor.ui
===================================================================
--- scribus/ui/notesstyleseditor.ui (revision 27767)
+++ scribus/ui/notesstyleseditor.ui (working copy)
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>324</width>
- <height>576</height>
+ <width>400</width>
+ <height>360</height>
</rect>
</property>
<property name="sizePolicy">
@@ -19,7 +19,7 @@
<property name="windowTitle">
<string>Notes Styles Editor</string>
</property>
- <layout class="QGridLayout" name="gridLayout">
+ <layout class="QGridLayout" name="mainLayout" rowstretch="0,0,1,0" columnstretch="0,0,1">
<property name="leftMargin">
<number>9</number>
</property>
@@ -32,306 +32,673 @@
<property name="bottomMargin">
<number>9</number>
</property>
- <item row="1" column="0">
- <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0" colspan="2">
+ <layout class="QHBoxLayout" name="topBarLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="EditingLabel">
+ <property name="minimumSize">
+ <size>
+ <width>89</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Editing:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="NSlistBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Select the notes style to edit</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="NewButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Add a new notes style</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>14</width>
+ <height>14</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" colspan="2">
+ <layout class="QHBoxLayout" name="nameLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>4</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="NewNameLabel">
+ <property name="minimumSize">
+ <size>
+ <width>89</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Style Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="nameLabelEditSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>6</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="NewNameEdit">
+ <property name="toolTip">
+ <string>Name for the new notes style</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="nameEditAddStyleSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>6</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="AddStyleButton">
+ <property name="toolTip">
+ <string>Add the new notes style using the settings below</string>
+ </property>
+ <property name="text">
+ <string>&Add Style</string>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>14</width>
+ <height>14</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="nameAddStyleCancelSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>4</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="CancelButton">
+ <property name="toolTip">
+ <string>Cancel adding the new notes style</string>
+ </property>
+ <property name="text">
+ <string>&Cancel</string>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>14</width>
+ <height>14</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="0">
+ <layout class="QVBoxLayout" name="leftColumnLayout">
+ <item>
+ <widget class="QGroupBox" name="groupNumbering">
+ <property name="styleSheet">
+ <string notr="true">QGroupBox#groupNumbering::title {
+ subcontrol-origin: margin;
+ subcontrol-position: top left;
+ left: 0px;
+ padding: 0px;
+}</string>
+ </property>
+ <property name="title">
+ <string>N&umbering</string>
+ </property>
+ <layout class="QFormLayout" name="formNumbering">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
+ <property name="leftMargin">
+ <number>9</number>
+ </property>
+ <property name="horizontalSpacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="TypeLabel">
+ <property name="minimumSize">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Type</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <layout class="QHBoxLayout" name="typeRowLayout">
+ <item>
+ <widget class="QRadioButton" name="FootRadio">
+ <property name="text">
+ <string>&Footnotes</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="EndRadio">
+ <property name="text">
+ <string>&Endnotes</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="typeRowSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="NumberingLabel">
+ <property name="minimumSize">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Format</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="NumFormatCombo" name="NumberingBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="RangeLabel">
+ <property name="minimumSize">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Range</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QComboBox" name="RangeBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="StartLabel">
+ <property name="minimumSize">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Start at</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QSpinBox" name="StartSpinBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>70</width>
+ <height>28</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>70</width>
+ <height>28</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>The number at which this notes style's numbering starts</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="PrefixLabel">
+ <property name="minimumSize">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Prefix</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QLineEdit" name="PrefixEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>70</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>70</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="SuffixLabel">
+ <property name="minimumSize">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Suffix</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QLineEdit" name="SuffixEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>70</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>70</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="leftColumnSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="1">
+ <layout class="QVBoxLayout" name="rightColumnLayout">
+ <item>
+ <widget class="QGroupBox" name="groupMarks">
+ <property name="title">
+ <string>&Marks && Styles</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_marks">
+ <property name="horizontalSpacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="charStyleComboLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="CharStyleComboBox" name="charStyleCombo">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Character style used to format the note reference mark</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="SuperMasterCheck">
+ <property name="toolTip">
+ <string>Show the note mark as superscript in the main text</string>
+ </property>
+ <property name="text">
+ <string>Superscript in &Text</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QCheckBox" name="SuperNoteCheck">
+ <property name="toolTip">
+ <string>Show the note mark as superscript in the note itself</string>
+ </property>
+ <property name="text">
+ <string>Superscript in &Notes</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2">
+ <spacer name="marksTinyGapSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>8</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="paraStyleComboLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="ParaStyleComboBox" name="paraStyleCombo">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Paragraph style used to format the note text</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupFrame">
+ <property name="title">
+ <string>Frame &Behavior</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_frame">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="AutoH">
+ <property name="toolTip">
+ <string>Automatically grow or shrink the notes frame height to fit its content</string>
+ </property>
+ <property name="text">
+ <string>Auto &Height</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QCheckBox" name="AutoW">
+ <property name="toolTip">
+ <string>Automatically grow or shrink the notes frame width to fit its content</string>
+ </property>
+ <property name="text">
+ <string>Auto &Width</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="AutoRemove">
+ <property name="toolTip">
+ <string>Automatically remove the notes frame when it becomes empty</string>
+ </property>
+ <property name="text">
+ <string>&Remove if Empty</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="AutoWeld">
+ <property name="toolTip">
+ <string>Automatically weld the notes frame to its marker frame</string>
+ </property>
+ <property name="text">
+ <string>Auto Weldin&g</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="rightColumnSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="2">
+ <spacer name="columnAreaHSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="0" colspan="2">
+ <layout class="QHBoxLayout" name="buttonRowLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <spacer name="buttonRowSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="DeleteButton">
+ <property name="toolTip">
+ <string>Delete the current notes style</string>
+ </property>
+ <property name="text">
+ <string>&Delete</string>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>14</width>
+ <height>14</height>
+ </size>
+ </property>
+ </widget>
+ </item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QComboBox" name="NSlistBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="NewButton">
- <property name="text">
- <string>Add New Style</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="NewNameLabel">
- <property name="text">
- <string>New Style Name</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="NewNameEdit"/>
- </item>
- <item row="1" column="0">
- <widget class="QRadioButton" name="FootRadio">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Footnotes</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QRadioButton" name="EndRadio">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Endnotes</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="NumberingLabel">
- <property name="text">
- <string>Numbering</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="NumFormatCombo" name="NumberingBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="RangeLabel">
- <property name="text">
- <string>Range</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QComboBox" name="RangeBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="StartLabel">
- <property name="text">
- <string>Start Number</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QSpinBox" name="StartSpinBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="PrefixLabel">
- <property name="text">
- <string>Prefix</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QLineEdit" name="PrefixEdit"/>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="SuffixLabel">
- <property name="text">
- <string>Suffix</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QLineEdit" name="SuffixEdit"/>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="SuperMasterLabel">
- <property name="text">
- <string>Superscript in text</string>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <widget class="QCheckBox" name="SuperMasterCheck">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="8" column="0">
- <widget class="QLabel" name="SuperNoteLabel">
- <property name="text">
- <string>Superscript in notes</string>
- </property>
- </widget>
- </item>
- <item row="8" column="1">
- <widget class="QCheckBox" name="SuperNoteCheck">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="9" column="0">
- <widget class="QLabel" name="charStyleComboLabel">
- <property name="lineWidth">
- <number>2</number>
- </property>
- <property name="text">
- <string>Mark Character Style</string>
- </property>
- <property name="textFormat">
- <enum>Qt::RichText</enum>
- </property>
- </widget>
- </item>
- <item row="9" column="1">
- <widget class="CharStyleComboBox" name="charStyleCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="10" column="0">
- <widget class="QLabel" name="paraStyleComboLabel">
- <property name="text">
- <string>Note Paragraph Style</string>
- </property>
- </widget>
- </item>
- <item row="10" column="1">
- <widget class="ParaStyleComboBox" name="paraStyleCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="11" column="0">
- <widget class="QLabel" name="AutoHLabel">
- <property name="text">
- <string>Auto Height</string>
- </property>
- </widget>
- </item>
- <item row="11" column="1">
- <widget class="QCheckBox" name="AutoH">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="12" column="0">
- <widget class="QLabel" name="AutoWLabel">
- <property name="text">
- <string>Auto Width</string>
- </property>
- </widget>
- </item>
- <item row="12" column="1">
- <widget class="QCheckBox" name="AutoW">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="13" column="0">
- <widget class="QLabel" name="AutoWeldLabel">
- <property name="text">
- <string>Auto Welding</string>
- </property>
- </widget>
- </item>
- <item row="13" column="1">
- <widget class="QCheckBox" name="AutoWeld">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="14" column="0">
- <widget class="QLabel" name="AutoRemoveLabel">
- <property name="text">
- <string>Remove if empty</string>
- </property>
- </widget>
- </item>
- <item row="14" column="1">
- <widget class="QCheckBox" name="AutoRemove">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QPushButton" name="ApplyButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Apply</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="DeleteButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Delete</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="OKButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>OK</string>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QPushButton" name="ApplyButton">
+ <property name="toolTip">
+ <string>Save changes to the current notes style</string>
+ </property>
+ <property name="text">
+ <string>&Save Changes</string>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>14</width>
+ <height>14</height>
+ </size>
+ </property>
+ </widget>
</item>
</layout>
</item>
Index: scribus/ui/notesstyleseditor.cpp
===================================================================
--- scribus/ui/notesstyleseditor.cpp (revision 27767)
+++ scribus/ui/notesstyleseditor.cpp (working copy)
@@ -1,5 +1,6 @@
#include <QMessageBox>
+#include "iconmanager.h"
#include "notesstyleseditor.h"
#include "pageitem_noteframe.h"
#include "prefsmanager.h"
@@ -20,7 +21,12 @@
m_prefs = PrefsManager::instance().prefsFile->getContext(pname);
setBlockSignals(true);
-
+
+ setupIcons();
+
+ AddStyleButton->setEnabled(false);
+ CancelButton->setEnabled(false);
+
setDoc(nullptr);
NSlistBox->setInsertPolicy(QComboBox::InsertAlphabetically);
@@ -43,6 +49,28 @@
storeSize();
}
+void NotesStylesEditor::setupIcons()
+{
+ IconManager& im = IconManager::instance();
+
+ NewButton->setIcon(im.loadIcon("paragraph-style-new"));
+ DeleteButton->setIcon(im.loadIcon("delete"));
+ ApplyButton->setIcon(im.loadIcon("alert-ok"));
+ AddStyleButton->setIcon(im.loadIcon("alert-ok"));
+ CancelButton->setIcon(im.loadIcon("alert-error"));
+
+ charStyleComboLabel->setPixmap(im.loadPixmap("character-style"));
+ paraStyleComboLabel->setPixmap(im.loadPixmap("paragraph-style"));
+
+ SuperMasterCheck->setIcon(im.loadIcon("character-superscript"));
+ SuperNoteCheck->setIcon(im.loadIcon("character-superscript"));
+
+ AutoH->setIcon(im.loadIcon("action-scale-height"));
+ AutoW->setIcon(im.loadIcon("action-scale-width"));
+ AutoWeld->setIcon(im.loadIcon("action-link"));
+ AutoRemove->setIcon(im.loadIcon("action-remove"));
+}
+
void NotesStylesEditor::changeEvent(QEvent *e)
{
if (e->type() == QEvent::LanguageChange)
@@ -60,19 +88,6 @@
retranslateUi(this);
- if (m_addNewNsMode)
- {
- OKButton->setText(tr("Cancel"));
- OKButton->setToolTip(tr("Dialog is in adding new notes style mode. After pressing Cancel button dialog will be switched into normal notes styles edit mode."));
- ApplyButton->setText(tr("Add Style"));
- }
- else
- {
- OKButton->setText(tr("OK"));
- OKButton->setToolTip("");
- ApplyButton->setText(tr("Apply"));
- }
-
bool paraStyleBlocked = paraStyleCombo->blockSignals(true);
int paraStyleIndex = paraStyleCombo->currentIndex();
paraStyleCombo->setDoc(m_Doc);
@@ -190,10 +205,8 @@
setBlockSignals(true);
NSlistBox->setCurrentIndex(NSlistBox->findText(NS->name()));
NewNameEdit->setText(NS->name());
- if (isDefaultNotesStyle(NS->name()))
- NewNameEdit->setEnabled(false);
- else
- NewNameEdit->setEnabled(true);
+ //the style name is only editable while creating a new notes style
+ NewNameEdit->setEnabled(m_addNewNsMode);
FootRadio->setChecked(!NS->isEndNotes());
EndRadio->setEnabled(true);
EndRadio->setChecked(NS->isEndNotes());
@@ -233,118 +246,132 @@
readNotesStyle(arg1);
}
-void NotesStylesEditor::on_ApplyButton_clicked()
+void NotesStylesEditor::markChanged()
{
+ //route the "unsaved changes" state to whichever commit button is
+ //currently active: AddStyleButton while adding a new notes style,
+ //ApplyButton otherwise
if (m_addNewNsMode)
- {
- QString newName = NSlistBox->currentText();
- NotesStyle newNS = m_changesMap.value(newName);
- if (!m_Doc->validateNSet(newNS))
- return;
-
- m_addNewNsMode = false;
- OKButton->setText(tr("OK"));
- OKButton->setToolTip("");
- ApplyButton->setText(tr("Apply"));
- m_Doc->newNotesStyle(newNS);
- updateNSList();
- NSlistBox->setCurrentIndex(NSlistBox->findText(newNS.name()));
- }
+ AddStyleButton->setEnabled(true);
else
+ ApplyButton->setEnabled(true);
+}
+
+void NotesStylesEditor::on_ApplyButton_clicked()
+{
+ //remember current NStyle
+ QString currNS = NSlistBox->currentText();
+ NotesStyle* NS = nullptr;
+
+ foreach (const QString &nsName, m_changesMap.keys())
{
- //remember current NStyle
- QString currNS = NSlistBox->currentText();
- NotesStyle* NS = nullptr;
-
- foreach (const QString &nsName, m_changesMap.keys())
- {
- NotesStyle n = m_changesMap.value(nsName);
+ NotesStyle n = m_changesMap.value(nsName);
- //validate settings
- if (!m_Doc->validateNSet(n))
+ //validate settings
+ if (!m_Doc->validateNSet(n))
+ {
+ NSlistBox->setCurrentIndex(NSlistBox->findText(n.name()));
+ break;
+ }
+ //rename
+ if (nsName != n.name())
+ {
+ //new name for existing set
+ QString newName = n.name();
+ getUniqueName(newName, m_changesMap.keys(),"=");
+ n.setName(newName);
+ NewNameEdit->setText(newName);
+ //current NSet name change
+ if (currNS == nsName)
+ currNS = newName;
+ NS = m_Doc->getNotesStyle(nsName);
+ m_Doc->renameNotesStyle(NS, newName);
+ m_Doc->setNotesChanged(true);
+ }
+ //change settings and update marks
+ NS = m_Doc->getNotesStyle(n.name());
+ Q_ASSERT(NS != nullptr);
+ if (*NS != n)
+ {
+ SimpleState* ss = nullptr;
+ if (UndoManager::undoEnabled())
{
- NSlistBox->setCurrentIndex(NSlistBox->findText(n.name()));
- break;
+ ss = new SimpleState(UndoManager::EditNotesStyle);
+ ss->set("NSTYLE", QString("edit"));
+ m_Doc->undoSetNotesStyle(ss, NS);
}
- //rename
- if (nsName != n.name())
+ //converting foot <--> end notes or changing footnotes range
+ if ((NS->isEndNotes() != n.isEndNotes()) || (NS->isEndNotes() && n.isEndNotes() && NS->range() != n.range()))
{
- //new name for existing set
- QString newName = n.name();
- getUniqueName(newName, m_changesMap.keys(),"=");
- n.setName(newName);
- NewNameEdit->setText(newName);
- //current NSet name change
- if (currNS == nsName)
- currNS = newName;
- NS = m_Doc->getNotesStyle(nsName);
- m_Doc->renameNotesStyle(NS, newName);
- m_Doc->setNotesChanged(true);
+ foreach (PageItem_NoteFrame* nF, m_Doc->listNotesFrames(NS))
+ m_Doc->delNoteFrame(nF, false);
+ if (n.isEndNotes())
+ m_Doc->flag_updateEndNotes = true;
}
- //change settings and update marks
- NS = m_Doc->getNotesStyle(n.name());
- Q_ASSERT(NS != nullptr);
- if (*NS != n)
+ m_Doc->setNotesChanged(true); //notesframes width must be updated
+ *NS = n;
+ if (ss)
{
- SimpleState* ss = nullptr;
- if (UndoManager::undoEnabled())
- {
- ss = new SimpleState(UndoManager::EditNotesStyle);
- ss->set("NSTYLE", QString("edit"));
- m_Doc->undoSetNotesStyle(ss, NS);
- }
- //converting foot <--> end notes or changing footnotes range
- if ((NS->isEndNotes() != n.isEndNotes()) || (NS->isEndNotes() && n.isEndNotes() && NS->range() != n.range()))
- {
- foreach (PageItem_NoteFrame* nF, m_Doc->listNotesFrames(NS))
- m_Doc->delNoteFrame(nF, false);
- if (n.isEndNotes())
- m_Doc->flag_updateEndNotes = true;
- }
- m_Doc->setNotesChanged(true); //notesframes width must be updated
- *NS = n;
- if (ss)
- {
- ss->set("NEWname", NS->name());
- ss->set("NEWstart", NS->start());
- ss->set("NEWendNotes", NS->isEndNotes());
- ss->set("NEWnumFormat", (int) NS->getType());
- ss->set("NEWrange", (int) NS->range());
- ss->set("NEWprefix", NS->prefix());
- ss->set("NEWsuffix", NS->suffix());
- ss->set("NEWautoH", NS->isAutoNotesHeight());
- ss->set("NEWautoW", NS->isAutoNotesWidth());
- ss->set("NEWautoWeld", NS->isAutoWeldNotesFrames());
- ss->set("NEWautoRemove", NS->isAutoRemoveEmptyNotesFrames());
- ss->set("NEWsuperMaster", NS->isSuperscriptInMaster());
- ss->set("NEWsuperNote", NS->isSuperscriptInNote());
- ss->set("NEWmarksChStyle", NS->marksChStyle());
- ss->set("NEWnotesParStyle", NS->notesParStyle());
- UndoManager::instance()->action(m_Doc, ss);
- }
- //invalidate all text frames with marks from current changed notes style
- foreach (PageItem* item, m_Doc->DocItems)
- {
- if (item->isTextFrame() && !item->isNoteFrame() && item->asTextFrame()->hasNoteMark(NS))
- item->invalid = true;
- }
- m_Doc->updateNotesNums(NS);
- m_Doc->updateNotesFramesSettings(NS);
- if (m_Doc->flag_updateEndNotes)
- m_Doc->updateEndnotesFrames(NS);
- m_Doc->updateNotesFramesStyles(NS);
+ ss->set("NEWname", NS->name());
+ ss->set("NEWstart", NS->start());
+ ss->set("NEWendNotes", NS->isEndNotes());
+ ss->set("NEWnumFormat", (int) NS->getType());
+ ss->set("NEWrange", (int) NS->range());
+ ss->set("NEWprefix", NS->prefix());
+ ss->set("NEWsuffix", NS->suffix());
+ ss->set("NEWautoH", NS->isAutoNotesHeight());
+ ss->set("NEWautoW", NS->isAutoNotesWidth());
+ ss->set("NEWautoWeld", NS->isAutoWeldNotesFrames());
+ ss->set("NEWautoRemove", NS->isAutoRemoveEmptyNotesFrames());
+ ss->set("NEWsuperMaster", NS->isSuperscriptInMaster());
+ ss->set("NEWsuperNote", NS->isSuperscriptInNote());
+ ss->set("NEWmarksChStyle", NS->marksChStyle());
+ ss->set("NEWnotesParStyle", NS->notesParStyle());
+ UndoManager::instance()->action(m_Doc, ss);
}
+ //invalidate all text frames with marks from current changed notes style
+ foreach (PageItem* item, m_Doc->DocItems)
+ {
+ if (item->isTextFrame() && !item->isNoteFrame() && item->asTextFrame()->hasNoteMark(NS))
+ item->invalid = true;
+ }
+ m_Doc->updateNotesNums(NS);
+ m_Doc->updateNotesFramesSettings(NS);
+ if (m_Doc->flag_updateEndNotes)
+ m_Doc->updateEndnotesFrames(NS);
+ m_Doc->updateNotesFramesStyles(NS);
}
- if (m_Doc->notesChanged())
- {
- updateNSList();
- m_Doc->flag_updateMarksLabels = true;
- m_Doc->changed();
- m_Doc->regionsChanged()->update(QRectF());
- }
- //restore NStyle index
- readNotesStyle(currNS);
}
+ if (m_Doc->notesChanged())
+ {
+ updateNSList();
+ m_Doc->flag_updateMarksLabels = true;
+ m_Doc->changed();
+ m_Doc->regionsChanged()->update(QRectF());
+ }
+ //restore NStyle index
+ readNotesStyle(currNS);
+
+ ApplyButton->setEnabled(false);
+ NSlistBox->setEnabled(true);
+ NewButton->setEnabled(true);
+}
+
+void NotesStylesEditor::on_AddStyleButton_clicked()
+{
+ QString newName = NSlistBox->currentText();
+ NotesStyle newNS = m_changesMap.value(newName);
+ if (!m_Doc->validateNSet(newNS))
+ return;
+
+ m_addNewNsMode = false;
+ AddStyleButton->setEnabled(false);
+ CancelButton->setEnabled(false);
+ ApplyButton->show();
+
+ m_Doc->newNotesStyle(newNS);
+ updateNSList();
+ NSlistBox->setCurrentIndex(NSlistBox->findText(newNS.name()));
ApplyButton->setEnabled(false);
NSlistBox->setEnabled(true);
@@ -375,45 +402,38 @@
getUniqueName(newName, m_changesMap.keys(), "_");
newNS.setName(newName);
m_changesMap.insert(newName, newNS);
+
+ m_addNewNsMode = true;
setNotesStyle(&newNS);
-
- NewNameEdit->setEnabled(true);
+
NSlistBox->addItem(newName);
NSlistBox->setCurrentIndex(NSlistBox->findText(newName));
NSlistBox->setEnabled(false);
- ApplyButton->setText(tr("Add Style"));
- ApplyButton->setEnabled(true);
DeleteButton->setEnabled(false);
NewButton->setEnabled(false);
- m_addNewNsMode = true;
- OKButton->setText(tr("Cancel Adding"));
- OKButton->setToolTip(tr("Notes Styles Editor is in adding new notes style mode. After pressing Cancel button Notes Styles Editor switch into normal notes styles edit mode."));
+
+ ApplyButton->hide();
+ AddStyleButton->setEnabled(true);
+ CancelButton->setEnabled(true);
}
-void NotesStylesEditor::on_OKButton_clicked()
-{
- if (m_addNewNsMode)
- {
- //in adding new style mode go back to normal editing mode
- OKButton->setText(tr("OK"));
- NewButton->setEnabled(true);
- m_addNewNsMode = false;
- QString newName = NSlistBox->currentText();
- m_changesMap.remove(newName);
- int index = NSlistBox->findText(newName);
- NSlistBox->removeItem(index);
- NSlistBox->setCurrentIndex(index - 1);
- on_NSlistBox_currentTextChanged(NSlistBox->currentText());
- }
- else
- {
- if (ApplyButton->isEnabled())
- //apply changes
- on_ApplyButton_clicked();
+void NotesStylesEditor::on_CancelButton_clicked()
+{
+ //abort adding new notes style, go back to normal editing mode
+ m_addNewNsMode = false;
+ AddStyleButton->setEnabled(false);
+ CancelButton->setEnabled(false);
+ ApplyButton->show();
+ ApplyButton->setEnabled(false);
+ NewButton->setEnabled(true);
- //in normal mode close
- close();
- }
+ QString newName = NSlistBox->currentText();
+ m_changesMap.remove(newName);
+ int index = NSlistBox->findText(newName);
+ NSlistBox->removeItem(index);
+ NSlistBox->setCurrentIndex(index - 1);
+ NSlistBox->setEnabled(true);
+ on_NSlistBox_currentTextChanged(NSlistBox->currentText());
}
void NotesStylesEditor::on_NewNameEdit_textChanged(const QString &arg1)
@@ -421,7 +441,7 @@
NotesStyle ns = m_changesMap.value(NSlistBox->currentText());
ns.setName(arg1);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_FootRadio_toggled(bool checked)
@@ -444,7 +464,7 @@
}
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
setBlockSignals(wasSignalsBlocked);
}
@@ -467,7 +487,7 @@
}
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
setBlockSignals(wasSignalsBlocked);
}
@@ -479,7 +499,7 @@
ns.setType(formatType);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_RangeBox_currentIndexChanged(int index)
@@ -488,7 +508,7 @@
ns.setRange((NumerationRange) RangeBox->itemData(index).toInt());
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_StartSpinBox_valueChanged(int arg1)
@@ -497,7 +517,7 @@
ns.setStart(arg1);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_PrefixEdit_textChanged(const QString &arg1)
@@ -506,7 +526,7 @@
ns.setPrefix(arg1);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_SuffixEdit_textChanged(const QString &arg1)
@@ -515,7 +535,7 @@
ns.setSuffix(arg1);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_SuperMasterCheck_toggled(bool checked)
@@ -524,7 +544,7 @@
ns.setSuperscriptInMaster(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_SuperNoteCheck_toggled(bool checked)
@@ -533,7 +553,7 @@
ns.setSuperscriptInNote(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_AutoH_toggled(bool checked)
@@ -542,7 +562,7 @@
ns.setAutoNotesHeight(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_AutoW_toggled(bool checked)
@@ -551,7 +571,7 @@
ns.setAutoNotesWidth(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_AutoWeld_toggled(bool checked)
@@ -560,7 +580,7 @@
ns.setAutoWeldNotesFrames(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_AutoRemove_toggled(bool checked)
@@ -569,7 +589,7 @@
ns.setAutoRemoveEmptyNotesFrames(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_paraStyleCombo_currentIndexChanged(const int &arg1)
@@ -580,7 +600,7 @@
else
ns.setNotesParStyle(paraStyleCombo->itemText(arg1));
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_charStyleCombo_currentIndexChanged(const int &arg1)
@@ -591,5 +611,5 @@
else
ns.setMarksCharStyle(charStyleCombo->itemText(arg1));
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
Index: scribus/ui/notesstyleseditor.h
===================================================================
--- scribus/ui/notesstyleseditor.h (revision 27767)
+++ scribus/ui/notesstyleseditor.h (working copy)
@@ -32,6 +32,8 @@
void changeNotesStyle();
void setBlockSignals(bool block);
bool isDefaultNotesStyle(const QString& nsName) const;
+ void setupIcons();
+ void markChanged();
public slots:
void setDoc(ScribusDoc *doc);
@@ -43,7 +45,8 @@
void on_NSlistBox_currentTextChanged(const QString &arg1);
void on_ApplyButton_clicked();
void on_DeleteButton_clicked();
- void on_OKButton_clicked();
+ void on_AddStyleButton_clicked();
+ void on_CancelButton_clicked();
void on_NewNameEdit_textChanged(const QString &arg1);
void on_FootRadio_toggled(bool checked);
void on_EndRadio_toggled(bool checked);
| ||||
| Patch | Yes | ||||
|
|
|
|
|
|
|
|
Explored a little more with AI discussion and here is the updated version. Changes in v1.9: • Label/column alignment now computed at runtime from actual text width, not hard-coded — stays correct across languages/fonts/DPI • Add Style/Cancel buttons removed; new styles are now just draft entries committed via the same Save Changes button • Delete discards an unsaved draft with no confirmation prompt • Fixed recurring layout bugs from Expanding-policy widgets in oversized cells (unwanted gaps/centring) • "Range" renamed to "Scope" throughout the UI • Coloured icons, Alt-key mnemonics, tooltip pass, dialog width tuned to avoid clipping The order to apply patches remains the same (patch a, b and c) notesstyleseditor_B_ui_changes_v1.9.patch (55,219 bytes)
Index: scribus/ui/notesstyleseditor.ui
===================================================================
--- scribus/ui/notesstyleseditor.ui (revision 27767)
+++ scribus/ui/notesstyleseditor.ui (working copy)
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>324</width>
- <height>576</height>
+ <width>510</width>
+ <height>360</height>
</rect>
</property>
<property name="sizePolicy">
@@ -19,7 +19,7 @@
<property name="windowTitle">
<string>Notes Styles Editor</string>
</property>
- <layout class="QGridLayout" name="gridLayout">
+ <layout class="QGridLayout" name="mainLayout" rowstretch="0,0,1,0" columnstretch="0,0,1">
<property name="leftMargin">
<number>9</number>
</property>
@@ -32,306 +32,654 @@
<property name="bottomMargin">
<number>9</number>
</property>
- <item row="1" column="0">
- <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <layout class="QHBoxLayout" name="topBarLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="EditingLabel">
+ <property name="text">
+ <string>Style:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="NSlistBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Select the notes style to edit</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="DeleteButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Delete the current notes style</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>14</width>
+ <height>14</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="NewButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Start a new notes style</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>14</width>
+ <height>14</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="1">
+ <layout class="QHBoxLayout" name="nameLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="NewNameLabel">
+ <property name="text">
+ <string>Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="nameLabelEditSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>6</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="NewNameEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip">
+ <string>Name for the new notes style</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" colspan="2">
+ <spacer name="topBarBottomSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>8</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="0">
+ <layout class="QVBoxLayout" name="leftColumnLayout">
+ <item>
+ <widget class="QLabel" name="NumberingGroupLabel">
+ <property name="text">
+ <string>N&umbering</string>
+ </property>
+ <property name="buddy">
+ <cstring>FootRadio</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupNumbering">
+ <property name="title">
+ <string/>
+ </property>
+ <layout class="QFormLayout" name="formNumbering">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
+ <property name="leftMargin">
+ <number>9</number>
+ </property>
+ <property name="horizontalSpacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="TypeLabel">
+ <property name="text">
+ <string>Note Type</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <layout class="QHBoxLayout" name="typeRowLayout">
+ <item>
+ <widget class="QRadioButton" name="FootRadio">
+ <property name="text">
+ <string>&Footnotes</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="EndRadio">
+ <property name="text">
+ <string>&Endnotes</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="typeRowSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="NumberingLabel">
+ <property name="text">
+ <string>Format</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="NumFormatCombo" name="NumberingBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="ScopeLabel">
+ <property name="text">
+ <string>Scope</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QComboBox" name="ScopeBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="StartLabel">
+ <property name="text">
+ <string>Start at</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QSpinBox" name="StartSpinBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>70</width>
+ <height>28</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>70</width>
+ <height>28</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>The number at which this notes style's numbering starts</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="PrefixLabel">
+ <property name="text">
+ <string>Prefix</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QLineEdit" name="PrefixEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>70</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>70</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="SuffixLabel">
+ <property name="text">
+ <string>Suffix</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QLineEdit" name="SuffixEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>70</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>70</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="leftColumnSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="1">
+ <layout class="QVBoxLayout" name="rightColumnLayout">
+ <item>
+ <widget class="QLabel" name="MarksGroupLabel">
+ <property name="text">
+ <string>&Mark && Note Styles</string>
+ </property>
+ <property name="buddy">
+ <cstring>charStyleCombo</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupMarks">
+ <property name="title">
+ <string/>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_marks">
+ <property name="horizontalSpacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="charStyleComboLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="CharStyleComboBox" name="charStyleCombo">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>215</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Character style used to format the note reference mark</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <spacer name="marksTrailingSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="1" alignment="Qt::AlignmentFlag::AlignLeft">
+ <widget class="QCheckBox" name="SuperMasterCheck">
+ <property name="toolTip">
+ <string>Show the note mark as superscript in the main text</string>
+ </property>
+ <property name="text">
+ <string>Superscript in &Text</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" alignment="Qt::AlignmentFlag::AlignLeft">
+ <widget class="QCheckBox" name="SuperNoteCheck">
+ <property name="toolTip">
+ <string>Show the note mark as superscript in the note itself</string>
+ </property>
+ <property name="text">
+ <string>Superscript in &Notes</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" colspan="2">
+ <spacer name="marksTinyGapSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>8</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="paraStyleComboLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="ParaStyleComboBox" name="paraStyleCombo">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>215</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>215</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="toolTip">
+ <string>Paragraph style used to format the note text</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupFrame">
+ <property name="title">
+ <string>Frame &Behavior</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_frame">
+ <property name="horizontalSpacing">
+ <number>6</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="AutoH">
+ <property name="toolTip">
+ <string>Automatically grow or shrink the notes frame height to fit its content</string>
+ </property>
+ <property name="text">
+ <string>Auto &Height</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QCheckBox" name="AutoW">
+ <property name="toolTip">
+ <string>Automatically grow or shrink the notes frame width to fit its content</string>
+ </property>
+ <property name="text">
+ <string>Auto &Width</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="AutoRemove">
+ <property name="toolTip">
+ <string>Automatically remove the notes frame when it becomes empty</string>
+ </property>
+ <property name="text">
+ <string>&Remove if Empty</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="AutoWeld">
+ <property name="toolTip">
+ <string>Automatically weld the notes frame to its marker frame</string>
+ </property>
+ <property name="text">
+ <string>Auto Weldin&g</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="rightColumnSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item row="2" column="2">
+ <spacer name="columnAreaHSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="3" column="0" colspan="2">
+ <layout class="QHBoxLayout" name="buttonRowLayout">
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <item>
+ <spacer name="buttonRowSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="ApplyButton">
+ <property name="toolTip">
+ <string>Save changes to the current notes style</string>
+ </property>
+ <property name="text">
+ <string>&Save Changes</string>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>14</width>
+ <height>14</height>
+ </size>
+ </property>
+ </widget>
+ </item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QComboBox" name="NSlistBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="NewButton">
- <property name="text">
- <string>Add New Style</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="NewNameLabel">
- <property name="text">
- <string>New Style Name</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="NewNameEdit"/>
- </item>
- <item row="1" column="0">
- <widget class="QRadioButton" name="FootRadio">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Footnotes</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QRadioButton" name="EndRadio">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Endnotes</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="NumberingLabel">
- <property name="text">
- <string>Numbering</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="NumFormatCombo" name="NumberingBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="RangeLabel">
- <property name="text">
- <string>Range</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QComboBox" name="RangeBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="StartLabel">
- <property name="text">
- <string>Start Number</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QSpinBox" name="StartSpinBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="PrefixLabel">
- <property name="text">
- <string>Prefix</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QLineEdit" name="PrefixEdit"/>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="SuffixLabel">
- <property name="text">
- <string>Suffix</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QLineEdit" name="SuffixEdit"/>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="SuperMasterLabel">
- <property name="text">
- <string>Superscript in text</string>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <widget class="QCheckBox" name="SuperMasterCheck">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="8" column="0">
- <widget class="QLabel" name="SuperNoteLabel">
- <property name="text">
- <string>Superscript in notes</string>
- </property>
- </widget>
- </item>
- <item row="8" column="1">
- <widget class="QCheckBox" name="SuperNoteCheck">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="9" column="0">
- <widget class="QLabel" name="charStyleComboLabel">
- <property name="lineWidth">
- <number>2</number>
- </property>
- <property name="text">
- <string>Mark Character Style</string>
- </property>
- <property name="textFormat">
- <enum>Qt::RichText</enum>
- </property>
- </widget>
- </item>
- <item row="9" column="1">
- <widget class="CharStyleComboBox" name="charStyleCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="10" column="0">
- <widget class="QLabel" name="paraStyleComboLabel">
- <property name="text">
- <string>Note Paragraph Style</string>
- </property>
- </widget>
- </item>
- <item row="10" column="1">
- <widget class="ParaStyleComboBox" name="paraStyleCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- </item>
- <item row="11" column="0">
- <widget class="QLabel" name="AutoHLabel">
- <property name="text">
- <string>Auto Height</string>
- </property>
- </widget>
- </item>
- <item row="11" column="1">
- <widget class="QCheckBox" name="AutoH">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="12" column="0">
- <widget class="QLabel" name="AutoWLabel">
- <property name="text">
- <string>Auto Width</string>
- </property>
- </widget>
- </item>
- <item row="12" column="1">
- <widget class="QCheckBox" name="AutoW">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="13" column="0">
- <widget class="QLabel" name="AutoWeldLabel">
- <property name="text">
- <string>Auto Welding</string>
- </property>
- </widget>
- </item>
- <item row="13" column="1">
- <widget class="QCheckBox" name="AutoWeld">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="14" column="0">
- <widget class="QLabel" name="AutoRemoveLabel">
- <property name="text">
- <string>Remove if empty</string>
- </property>
- </widget>
- </item>
- <item row="14" column="1">
- <widget class="QCheckBox" name="AutoRemove">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QPushButton" name="ApplyButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Apply</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="DeleteButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Delete</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="OKButton">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>OK</string>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QPushButton" name="OKButton">
+ <property name="toolTip">
+ <string>Close the Notes Styles Editor</string>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>14</width>
+ <height>14</height>
+ </size>
+ </property>
+ </widget>
</item>
</layout>
</item>
Index: scribus/ui/notesstyleseditor.cpp
===================================================================
--- scribus/ui/notesstyleseditor.cpp (revision 27767)
+++ scribus/ui/notesstyleseditor.cpp (working copy)
@@ -1,5 +1,8 @@
+#include <QFont>
+#include <QList>
#include <QMessageBox>
+#include "iconmanager.h"
#include "notesstyleseditor.h"
#include "pageitem_noteframe.h"
#include "prefsmanager.h"
@@ -20,12 +23,14 @@
m_prefs = PrefsManager::instance().prefsFile->getContext(pname);
setBlockSignals(true);
-
+
+ setupIcons();
+
setDoc(nullptr);
NSlistBox->setInsertPolicy(QComboBox::InsertAlphabetically);
- RangeBox->addItem(tr("Document"), static_cast<int>(NSRdocument));
- RangeBox->addItem(tr("Story"), static_cast<int>(NSRstory));
+ ScopeBox->addItem(tr("Document"), static_cast<int>(NSRdocument));
+ ScopeBox->addItem(tr("Story"), static_cast<int>(NSRstory));
languageChange();
@@ -43,6 +48,59 @@
storeSize();
}
+void NotesStylesEditor::setupIcons()
+{
+ IconManager& im = IconManager::instance();
+
+ NewButton->setIcon(im.loadIcon("paragraph-style-new"));
+ DeleteButton->setIcon(im.loadIcon("delete"));
+ ApplyButton->setIcon(im.loadIcon("alert-ok"));
+ OKButton->setIcon(im.loadIcon("close"));
+
+ charStyleComboLabel->setPixmap(im.loadPixmap("character-style"));
+ paraStyleComboLabel->setPixmap(im.loadPixmap("paragraph-style"));
+
+ SuperMasterCheck->setIcon(im.loadIcon("character-superscript"));
+ SuperNoteCheck->setIcon(im.loadIcon("character-superscript"));
+
+ AutoH->setIcon(im.loadIcon("action-scale-height"));
+ AutoW->setIcon(im.loadIcon("action-scale-width"));
+ AutoWeld->setIcon(im.loadIcon("action-link"));
+ AutoRemove->setIcon(im.loadIcon("action-remove"));
+}
+
+void NotesStylesEditor::alignLabelColumns()
+{
+ //Keep "Style:" and "Name:" aligned with each other only, sized to
+ //their actual rendered text (not a hardcoded guess, so this stays
+ //correct for any language, font, or DPI). "Numbering" is deliberately
+ //excluded: it is longer than either, and sharing its width would pad
+ //"Style:"/"Name:" well past what their own text needs, opening a gap
+ //between each label and its field. Left-alignment with "Numbering"
+ //needs no width matching at all - as the first item in its own
+ //layout, it already starts at the same x regardless of its width.
+ const QList<QLabel*> outerLabels = { EditingLabel, NewNameLabel };
+ int outerWidth = 0;
+ for (QLabel* lbl : outerLabels)
+ outerWidth = qMax(outerWidth, lbl->sizeHint().width());
+ for (QLabel* lbl : outerLabels)
+ lbl->setMinimumWidth(outerWidth);
+
+ //Separately, keep the Numbering group's own field labels aligned with
+ //each other. A small uniform padding on top of the widest label's
+ //width gives every row some breathing room before its field starts,
+ //while keeping all six fields - including the Type row's radio
+ //buttons - aligned with each other, since all six labels still share
+ //the exact same width.
+ const QList<QLabel*> innerLabels = { TypeLabel, NumberingLabel, ScopeLabel, StartLabel, PrefixLabel, SuffixLabel };
+ int innerWidth = 0;
+ for (QLabel* lbl : innerLabels)
+ innerWidth = qMax(innerWidth, lbl->sizeHint().width());
+ innerWidth += 6;
+ for (QLabel* lbl : innerLabels)
+ lbl->setMinimumWidth(innerWidth);
+}
+
void NotesStylesEditor::changeEvent(QEvent *e)
{
if (e->type() == QEvent::LanguageChange)
@@ -60,19 +118,6 @@
retranslateUi(this);
- if (m_addNewNsMode)
- {
- OKButton->setText(tr("Cancel"));
- OKButton->setToolTip(tr("Dialog is in adding new notes style mode. After pressing Cancel button dialog will be switched into normal notes styles edit mode."));
- ApplyButton->setText(tr("Add Style"));
- }
- else
- {
- OKButton->setText(tr("OK"));
- OKButton->setToolTip("");
- ApplyButton->setText(tr("Apply"));
- }
-
bool paraStyleBlocked = paraStyleCombo->blockSignals(true);
int paraStyleIndex = paraStyleCombo->currentIndex();
paraStyleCombo->setDoc(m_Doc);
@@ -87,14 +132,16 @@
charStyleCombo->setCurrentIndex(charStyleIndex);
charStyleCombo->blockSignals(charStyleBlocked);
- bool rangeBlocked = RangeBox->blockSignals(true);
- int rangeIndex = RangeBox->currentIndex();
- RangeBox->clear();
- RangeBox->addItem(tr("Document"), static_cast<int>(NSRdocument));
- RangeBox->addItem(tr("Story"), static_cast<int>(NSRstory));
- if (rangeIndex >= 0)
- RangeBox->setCurrentIndex(rangeIndex);
- RangeBox->blockSignals(rangeBlocked);
+ bool scopeBlocked = ScopeBox->blockSignals(true);
+ int scopeIndex = ScopeBox->currentIndex();
+ ScopeBox->clear();
+ ScopeBox->addItem(tr("Document"), static_cast<int>(NSRdocument));
+ ScopeBox->addItem(tr("Story"), static_cast<int>(NSRstory));
+ if (scopeIndex >= 0)
+ ScopeBox->setCurrentIndex(scopeIndex);
+ ScopeBox->blockSignals(scopeBlocked);
+
+ alignLabelColumns();
setBlockSignals(wasSignalsBlocked);
}
@@ -146,6 +193,18 @@
NSlistBox->setEnabled(false);
else
{
+ //preserve any not-yet-saved draft entries across the refresh -
+ //without this, an unrelated action that happens to call
+ //updateNSList() (e.g. deleting a different, saved style) would
+ //silently wipe out a style the user is still in the middle of
+ //creating
+ QMap<QString, NotesStyle> drafts;
+ foreach (const QString &name, m_changesMap.keys())
+ {
+ if (isDraftNotesStyle(name))
+ drafts.insert(name, m_changesMap.value(name));
+ }
+
NSlistBox->clear();
m_changesMap.clear();
for (int a = 0; a < m_Doc->m_docNotesStylesList.count(); ++a)
@@ -153,7 +212,15 @@
NSlistBox->addItem(m_Doc->m_docNotesStylesList.at(a)->name());
m_changesMap.insert(m_Doc->m_docNotesStylesList.at(a)->name(), *(m_Doc->m_docNotesStylesList.at(a)));
}
- if (!m_Doc->m_docNotesStylesList.isEmpty())
+ QMapIterator<QString, NotesStyle> it(drafts);
+ while (it.hasNext())
+ {
+ it.next();
+ NSlistBox->addItem(it.key());
+ markDraftItem(NSlistBox->count() - 1);
+ m_changesMap.insert(it.key(), it.value());
+ }
+ if (!m_Doc->m_docNotesStylesList.isEmpty() || !drafts.isEmpty())
NSlistBox->setEnabled(true);
}
NSlistBox->blockSignals(wasSignalsBlocked);
@@ -172,6 +239,27 @@
return (ns != nullptr) && (ns == m_Doc->m_docNotesStylesList.at(0));
}
+bool NotesStylesEditor::isDraftNotesStyle(const QString& nsName) const
+{
+ //a "draft" is an entry that exists in m_changesMap/NSlistBox but has
+ //never been saved into the document yet (created via NewButton, not
+ //yet committed via ApplyButton) - derived from the document itself
+ //rather than tracked separately, so there is nothing to keep in sync
+ if (m_Doc == nullptr)
+ return false;
+ return (m_Doc->getNotesStyle(nsName) == nullptr);
+}
+
+void NotesStylesEditor::markDraftItem(int index)
+{
+ //visually distinguish an unsaved draft entry in the list (italic)
+ //without touching its text, since that text doubles as the
+ //m_changesMap lookup key throughout this class
+ QFont draftFont = NSlistBox->font();
+ draftFont.setItalic(true);
+ NSlistBox->setItemData(index, draftFont, Qt::FontRole);
+}
+
void NotesStylesEditor::setBlockSignals(bool block)
{
foreach (QWidget* obj, findChildren<QWidget *>())
@@ -190,16 +278,17 @@
setBlockSignals(true);
NSlistBox->setCurrentIndex(NSlistBox->findText(NS->name()));
NewNameEdit->setText(NS->name());
- if (isDefaultNotesStyle(NS->name()))
- NewNameEdit->setEnabled(false);
- else
- NewNameEdit->setEnabled(true);
+ //the style name is only editable for a not-yet-saved draft (auto-
+ //unlocked, since it has no real name to protect yet); unlike
+ //paragraph/character styles, the "default" notes style isn't
+ //special-cased elsewhere in the document engine
+ NewNameEdit->setEnabled(isDraftNotesStyle(NS->name()));
FootRadio->setChecked(!NS->isEndNotes());
EndRadio->setEnabled(true);
EndRadio->setChecked(NS->isEndNotes());
NumberingBox->setCurrentFormat(NS->getType());
- int rangeIndex = RangeBox->findData((int) NS->range());
- RangeBox->setCurrentIndex((rangeIndex >= 0) ? rangeIndex : 0);
+ int scopeIndex = ScopeBox->findData((int) NS->range());
+ ScopeBox->setCurrentIndex((scopeIndex >= 0) ? scopeIndex : 0);
StartSpinBox->setValue(NS->start());
PrefixEdit->setText(NS->prefix());
SuffixEdit->setText(NS->suffix());
@@ -233,127 +322,144 @@
readNotesStyle(arg1);
}
+void NotesStylesEditor::markChanged()
+{
+ //there is only one commit button (Save Changes) regardless of
+ //whether the current entry is a draft or an existing style
+ ApplyButton->setEnabled(true);
+}
+
void NotesStylesEditor::on_ApplyButton_clicked()
{
- if (m_addNewNsMode)
- {
- QString newName = NSlistBox->currentText();
- NotesStyle newNS = m_changesMap.value(newName);
- if (!m_Doc->validateNSet(newNS))
- return;
-
- m_addNewNsMode = false;
- OKButton->setText(tr("OK"));
- OKButton->setToolTip("");
- ApplyButton->setText(tr("Apply"));
- m_Doc->newNotesStyle(newNS);
- updateNSList();
- NSlistBox->setCurrentIndex(NSlistBox->findText(newNS.name()));
- }
- else
+ //remember current NStyle
+ QString currNS = NSlistBox->currentText();
+ NotesStyle* NS = nullptr;
+
+ foreach (const QString &nsName, m_changesMap.keys())
{
- //remember current NStyle
- QString currNS = NSlistBox->currentText();
- NotesStyle* NS = nullptr;
-
- foreach (const QString &nsName, m_changesMap.keys())
- {
- NotesStyle n = m_changesMap.value(nsName);
+ NotesStyle n = m_changesMap.value(nsName);
- //validate settings
- if (!m_Doc->validateNSet(n))
- {
- NSlistBox->setCurrentIndex(NSlistBox->findText(n.name()));
- break;
- }
- //rename
- if (nsName != n.name())
+ //validate settings
+ if (!m_Doc->validateNSet(n))
+ {
+ NSlistBox->setCurrentIndex(NSlistBox->findText(n.name()));
+ break;
+ }
+ //brand new style that has never been saved - create it now with
+ //whatever settings were configured. There is nothing to rename or
+ //diff against an existing entry, since it doesn't exist in the
+ //document yet; creating it captures all of its settings in one go.
+ if (isDraftNotesStyle(nsName))
+ {
+ NotesStyle* createdNS = m_Doc->newNotesStyle(n);
+ if (createdNS != nullptr)
{
- //new name for existing set
- QString newName = n.name();
- getUniqueName(newName, m_changesMap.keys(),"=");
- n.setName(newName);
- NewNameEdit->setText(newName);
- //current NSet name change
if (currNS == nsName)
- currNS = newName;
- NS = m_Doc->getNotesStyle(nsName);
- m_Doc->renameNotesStyle(NS, newName);
+ currNS = createdNS->name();
m_Doc->setNotesChanged(true);
}
- //change settings and update marks
- NS = m_Doc->getNotesStyle(n.name());
- Q_ASSERT(NS != nullptr);
- if (*NS != n)
- {
- SimpleState* ss = nullptr;
- if (UndoManager::undoEnabled())
- {
- ss = new SimpleState(UndoManager::EditNotesStyle);
- ss->set("NSTYLE", QString("edit"));
- m_Doc->undoSetNotesStyle(ss, NS);
- }
- //converting foot <--> end notes or changing footnotes range
- if ((NS->isEndNotes() != n.isEndNotes()) || (NS->isEndNotes() && n.isEndNotes() && NS->range() != n.range()))
- {
- foreach (PageItem_NoteFrame* nF, m_Doc->listNotesFrames(NS))
- m_Doc->delNoteFrame(nF, false);
- if (n.isEndNotes())
- m_Doc->flag_updateEndNotes = true;
- }
- m_Doc->setNotesChanged(true); //notesframes width must be updated
- *NS = n;
- if (ss)
- {
- ss->set("NEWname", NS->name());
- ss->set("NEWstart", NS->start());
- ss->set("NEWendNotes", NS->isEndNotes());
- ss->set("NEWnumFormat", (int) NS->getType());
- ss->set("NEWrange", (int) NS->range());
- ss->set("NEWprefix", NS->prefix());
- ss->set("NEWsuffix", NS->suffix());
- ss->set("NEWautoH", NS->isAutoNotesHeight());
- ss->set("NEWautoW", NS->isAutoNotesWidth());
- ss->set("NEWautoWeld", NS->isAutoWeldNotesFrames());
- ss->set("NEWautoRemove", NS->isAutoRemoveEmptyNotesFrames());
- ss->set("NEWsuperMaster", NS->isSuperscriptInMaster());
- ss->set("NEWsuperNote", NS->isSuperscriptInNote());
- ss->set("NEWmarksChStyle", NS->marksChStyle());
- ss->set("NEWnotesParStyle", NS->notesParStyle());
- UndoManager::instance()->action(m_Doc, ss);
- }
- //invalidate all text frames with marks from current changed notes style
- foreach (PageItem* item, m_Doc->DocItems)
- {
- if (item->isTextFrame() && !item->isNoteFrame() && item->asTextFrame()->hasNoteMark(NS))
- item->invalid = true;
- }
- m_Doc->updateNotesNums(NS);
- m_Doc->updateNotesFramesSettings(NS);
- if (m_Doc->flag_updateEndNotes)
- m_Doc->updateEndnotesFrames(NS);
- m_Doc->updateNotesFramesStyles(NS);
- }
+ continue;
}
- if (m_Doc->notesChanged())
+ //rename
+ if (nsName != n.name())
{
- updateNSList();
- m_Doc->flag_updateMarksLabels = true;
- m_Doc->changed();
- m_Doc->regionsChanged()->update(QRectF());
+ //new name for existing set
+ QString newName = n.name();
+ getUniqueName(newName, m_changesMap.keys(),"=");
+ n.setName(newName);
+ NewNameEdit->setText(newName);
+ //current NSet name change
+ if (currNS == nsName)
+ currNS = newName;
+ NS = m_Doc->getNotesStyle(nsName);
+ m_Doc->renameNotesStyle(NS, newName);
+ m_Doc->setNotesChanged(true);
}
- //restore NStyle index
- readNotesStyle(currNS);
+ //change settings and update marks
+ NS = m_Doc->getNotesStyle(n.name());
+ Q_ASSERT(NS != nullptr);
+ if (*NS != n)
+ {
+ SimpleState* ss = nullptr;
+ if (UndoManager::undoEnabled())
+ {
+ ss = new SimpleState(UndoManager::EditNotesStyle);
+ ss->set("NSTYLE", QString("edit"));
+ m_Doc->undoSetNotesStyle(ss, NS);
+ }
+ //converting foot <--> end notes or changing footnotes scope
+ if ((NS->isEndNotes() != n.isEndNotes()) || (NS->isEndNotes() && n.isEndNotes() && NS->range() != n.range()))
+ {
+ foreach (PageItem_NoteFrame* nF, m_Doc->listNotesFrames(NS))
+ m_Doc->delNoteFrame(nF, false);
+ if (n.isEndNotes())
+ m_Doc->flag_updateEndNotes = true;
+ }
+ m_Doc->setNotesChanged(true); //notesframes width must be updated
+ *NS = n;
+ if (ss)
+ {
+ ss->set("NEWname", NS->name());
+ ss->set("NEWstart", NS->start());
+ ss->set("NEWendNotes", NS->isEndNotes());
+ ss->set("NEWnumFormat", (int) NS->getType());
+ ss->set("NEWrange", (int) NS->range());
+ ss->set("NEWprefix", NS->prefix());
+ ss->set("NEWsuffix", NS->suffix());
+ ss->set("NEWautoH", NS->isAutoNotesHeight());
+ ss->set("NEWautoW", NS->isAutoNotesWidth());
+ ss->set("NEWautoWeld", NS->isAutoWeldNotesFrames());
+ ss->set("NEWautoRemove", NS->isAutoRemoveEmptyNotesFrames());
+ ss->set("NEWsuperMaster", NS->isSuperscriptInMaster());
+ ss->set("NEWsuperNote", NS->isSuperscriptInNote());
+ ss->set("NEWmarksChStyle", NS->marksChStyle());
+ ss->set("NEWnotesParStyle", NS->notesParStyle());
+ UndoManager::instance()->action(m_Doc, ss);
+ }
+ //invalidate all text frames with marks from current changed notes style
+ foreach (PageItem* item, m_Doc->DocItems)
+ {
+ if (item->isTextFrame() && !item->isNoteFrame() && item->asTextFrame()->hasNoteMark(NS))
+ item->invalid = true;
+ }
+ m_Doc->updateNotesNums(NS);
+ m_Doc->updateNotesFramesSettings(NS);
+ if (m_Doc->flag_updateEndNotes)
+ m_Doc->updateEndnotesFrames(NS);
+ m_Doc->updateNotesFramesStyles(NS);
+ }
+ }
+ if (m_Doc->notesChanged())
+ {
+ updateNSList();
+ m_Doc->flag_updateMarksLabels = true;
+ m_Doc->changed();
+ m_Doc->regionsChanged()->update(QRectF());
}
+ //restore NStyle index
+ readNotesStyle(currNS);
ApplyButton->setEnabled(false);
- NSlistBox->setEnabled(true);
- NewButton->setEnabled(true);
}
void NotesStylesEditor::on_DeleteButton_clicked()
{
QString nsName(NSlistBox->currentText());
+
+ if (isDraftNotesStyle(nsName))
+ {
+ //discard a not-yet-saved draft - nothing has been persisted yet,
+ //so no confirmation is needed (the same reasoning most apps use
+ //for closing an empty untitled document without prompting), and
+ //there is nothing in the document to actually delete
+ m_changesMap.remove(nsName);
+ int index = NSlistBox->findText(nsName);
+ NSlistBox->removeItem(index);
+ NSlistBox->setCurrentIndex(qMax(0, index - 1));
+ on_NSlistBox_currentTextChanged(NSlistBox->currentText());
+ return;
+ }
+
int t = ScMessageBox::warning(m_Doc->scMW(), tr("Warning! Deleting Notes Style"), "<qt>" +
tr("You are going to delete notes style %1. All notes and marks using that style are also going to be deleted.").arg(nsName) + "</qt>",
QMessageBox::Ok | QMessageBox::Abort,
@@ -367,53 +473,30 @@
setDoc(m_Doc);
}
+void NotesStylesEditor::on_OKButton_clicked()
+{
+ close();
+}
+
void NotesStylesEditor::on_NewButton_clicked()
{
+ //clone the currently selected style's settings as a starting point,
+ //add it to the list as a plain entry (no special "mode" - it behaves
+ //like any other entry except that it doesn't exist in the document
+ //until Save Changes is clicked), and auto-unlock its name for editing
QString oldName = NSlistBox->currentText();
NotesStyle newNS = m_changesMap.value(oldName);
QString newName = oldName;
getUniqueName(newName, m_changesMap.keys(), "_");
newNS.setName(newName);
m_changesMap.insert(newName, newNS);
- setNotesStyle(&newNS);
-
- NewNameEdit->setEnabled(true);
- NSlistBox->addItem(newName);
- NSlistBox->setCurrentIndex(NSlistBox->findText(newName));
- NSlistBox->setEnabled(false);
- ApplyButton->setText(tr("Add Style"));
- ApplyButton->setEnabled(true);
- DeleteButton->setEnabled(false);
- NewButton->setEnabled(false);
- m_addNewNsMode = true;
- OKButton->setText(tr("Cancel Adding"));
- OKButton->setToolTip(tr("Notes Styles Editor is in adding new notes style mode. After pressing Cancel button Notes Styles Editor switch into normal notes styles edit mode."));
-}
-void NotesStylesEditor::on_OKButton_clicked()
-{
- if (m_addNewNsMode)
- {
- //in adding new style mode go back to normal editing mode
- OKButton->setText(tr("OK"));
- NewButton->setEnabled(true);
- m_addNewNsMode = false;
- QString newName = NSlistBox->currentText();
- m_changesMap.remove(newName);
- int index = NSlistBox->findText(newName);
- NSlistBox->removeItem(index);
- NSlistBox->setCurrentIndex(index - 1);
- on_NSlistBox_currentTextChanged(NSlistBox->currentText());
- }
- else
- {
- if (ApplyButton->isEnabled())
- //apply changes
- on_ApplyButton_clicked();
+ NSlistBox->addItem(newName);
+ markDraftItem(NSlistBox->count() - 1);
+ setNotesStyle(&newNS);
- //in normal mode close
- close();
- }
+ NewNameEdit->setFocus();
+ NewNameEdit->selectAll();
}
void NotesStylesEditor::on_NewNameEdit_textChanged(const QString &arg1)
@@ -421,7 +504,7 @@
NotesStyle ns = m_changesMap.value(NSlistBox->currentText());
ns.setName(arg1);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_FootRadio_toggled(bool checked)
@@ -444,7 +527,7 @@
}
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
setBlockSignals(wasSignalsBlocked);
}
@@ -467,7 +550,7 @@
}
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
setBlockSignals(wasSignalsBlocked);
}
@@ -479,16 +562,16 @@
ns.setType(formatType);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
-void NotesStylesEditor::on_RangeBox_currentIndexChanged(int index)
+void NotesStylesEditor::on_ScopeBox_currentIndexChanged(int index)
{
NotesStyle ns = m_changesMap.value(NSlistBox->currentText());
- ns.setRange((NumerationRange) RangeBox->itemData(index).toInt());
+ ns.setRange((NumerationRange) ScopeBox->itemData(index).toInt());
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_StartSpinBox_valueChanged(int arg1)
@@ -497,7 +580,7 @@
ns.setStart(arg1);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_PrefixEdit_textChanged(const QString &arg1)
@@ -506,7 +589,7 @@
ns.setPrefix(arg1);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_SuffixEdit_textChanged(const QString &arg1)
@@ -515,7 +598,7 @@
ns.setSuffix(arg1);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_SuperMasterCheck_toggled(bool checked)
@@ -524,7 +607,7 @@
ns.setSuperscriptInMaster(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_SuperNoteCheck_toggled(bool checked)
@@ -533,7 +616,7 @@
ns.setSuperscriptInNote(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_AutoH_toggled(bool checked)
@@ -542,7 +625,7 @@
ns.setAutoNotesHeight(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_AutoW_toggled(bool checked)
@@ -551,7 +634,7 @@
ns.setAutoNotesWidth(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_AutoWeld_toggled(bool checked)
@@ -560,7 +643,7 @@
ns.setAutoWeldNotesFrames(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_AutoRemove_toggled(bool checked)
@@ -569,7 +652,7 @@
ns.setAutoRemoveEmptyNotesFrames(checked);
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_paraStyleCombo_currentIndexChanged(const int &arg1)
@@ -580,7 +663,7 @@
else
ns.setNotesParStyle(paraStyleCombo->itemText(arg1));
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
void NotesStylesEditor::on_charStyleCombo_currentIndexChanged(const int &arg1)
@@ -591,5 +674,5 @@
else
ns.setMarksCharStyle(charStyleCombo->itemText(arg1));
m_changesMap.insert(NSlistBox->currentText(), ns);
- ApplyButton->setEnabled(true);
+ markChanged();
}
Index: scribus/ui/notesstyleseditor.h
===================================================================
--- scribus/ui/notesstyleseditor.h (revision 27767)
+++ scribus/ui/notesstyleseditor.h (working copy)
@@ -25,13 +25,17 @@
private:
ScribusDoc *m_Doc { nullptr };
PrefsContext *m_prefs { nullptr };
- bool m_addNewNsMode { false };
QMap<QString, NotesStyle> m_changesMap; //<NSname to change, NSet new values>
void readNotesStyle(const QString& nsName);
void changeNotesStyle();
void setBlockSignals(bool block);
bool isDefaultNotesStyle(const QString& nsName) const;
+ bool isDraftNotesStyle(const QString& nsName) const;
+ void markDraftItem(int index);
+ void setupIcons();
+ void markChanged();
+ void alignLabelColumns();
public slots:
void setDoc(ScribusDoc *doc);
@@ -48,7 +52,7 @@
void on_FootRadio_toggled(bool checked);
void on_EndRadio_toggled(bool checked);
void on_NumberingBox_currentIndexChanged(int index);
- void on_RangeBox_currentIndexChanged(int index);
+ void on_ScopeBox_currentIndexChanged(int index);
void on_StartSpinBox_valueChanged(int arg1);
void on_PrefixEdit_textChanged(const QString &arg1);
void on_SuffixEdit_textChanged(const QString &arg1);
|
|
|
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-08-09 04:36 | qirat | New Issue | |
| 2026-08-09 04:36 | qirat | File Added: notesstyleseditor_B_ui_changes.patch | |
| 2026-08-09 04:43 | qirat | Note Added: 0054182 | |
| 2026-08-09 04:43 | qirat | File Added: notes-style-editor-current.png | |
| 2026-08-09 04:43 | qirat | File Added: notes-style-editor-proposed.png | |
| 2026-08-09 05:18 | qirat | Note Added: 0054183 | |
| 2026-08-09 13:41 | qirat | Note Added: 0054185 | |
| 2026-08-09 13:41 | qirat | File Added: notesstyleseditor_B_ui_changes_v1.9.patch | |
| 2026-08-09 13:42 | qirat | Note Added: 0054186 | |
| 2026-08-09 13:42 | qirat | File Added: notes-style-editor-proposed-v1.9-patch.png |