View Issue Details

IDProjectCategoryView StatusLast Update
0017920ScribusUser Interfacepublic2026-08-10 07:49
Reporterqirat Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
PlatformLinuxOSFedora WorkstationOS Version44
Product Version1.7.4.svn 
Summary0017920: [PATCH] Line Style Edior widget UI polish update
DescriptionSome more UI polish as an improvement on 0017910
Steps To Reproduce#Files touched
- smlinestylewidget.h/.cpp/.ui, smlinestyle.cpp
TagsNo tags attached.
Attached Files
linestyle_editor_ui_v1.4.patch (36,598 bytes)   
Index: scribus/ui/smlinestylewidget.h
===================================================================
--- scribus/ui/smlinestylewidget.h	(revision 27769)
+++ scribus/ui/smlinestylewidget.h	(working copy)
@@ -9,6 +9,7 @@
 #define SMLINESTYLEWIDGET_H
 
 class QEvent;
+class QButtonGroup;
 
 #include "scribusstructs.h"
 #include "styleitem.h"
@@ -29,6 +30,12 @@
 	void showStyle(const MultiLine &lineStyle, ColorList &colorList, int subLine = 0);
 	void unitChange(int unitIndex);
 
+signals:
+	// emitted with the same 0/1/2 index convention the old endCombo/joinCombo
+	// activated(int) signals used, so callers need no changes beyond reconnecting
+	void capActivated(int i);
+	void joinActivated(int i);
+
 protected:
 	void changeEvent(QEvent *e) override;
 
@@ -36,8 +43,11 @@
 	MultiLine  m_currentStyle;
 	ColorList  m_colors;
 
-	void fillEndCombo();
-	void fillJoinCombo();
+	QButtonGroup *m_capButtonGroup = nullptr;
+	QButtonGroup *m_joinButtonGroup = nullptr;
+
+	void setupCapJoinButtons();
+	void updateCapJoinButtons();
 
 	void updateLineList();
 	QColor getColor(const QString &name, int shade);
@@ -48,6 +58,8 @@
 	void iconSetChange();
 	void languageChange();
 	void slotEditNewLine(int i);
+	void slotCapButtonClicked(int id);
+	void slotJoinButtonClicked(int id);
 
 };
 

Index: scribus/ui/smlinestylewidget.cpp
===================================================================
--- scribus/ui/smlinestylewidget.cpp	(revision 27769)
+++ scribus/ui/smlinestylewidget.cpp	(working copy)
@@ -5,6 +5,7 @@
 for which a new license (GPL+exception) is in place.
 */
 
+#include <QButtonGroup>
 #include <QEvent>
 #include <QToolTip>
 
@@ -31,8 +32,7 @@
 	lineWidth->setMinimum(0.0);
 	lineWidth->setMaximum(300.0);
 
-	fillEndCombo();
-	fillJoinCombo();
+	setupCapJoinButtons();
 
 	languageChange();
 
@@ -54,44 +54,18 @@
 	addButton->setIcon(iconManager.loadIcon("stroke-add"));
 	removeButton->setIcon(iconManager.loadIcon("stroke-remove"));
 
-	int  oldEndComboIndex = endCombo->currentIndex();
-	bool endComboBlocked  = endCombo->blockSignals(true);
-
-	int  oldJoinComboIndex = joinCombo->currentIndex();
-	bool joinComboBlocked  = joinCombo->blockSignals(true);
-
-	fillEndCombo();
-	fillJoinCombo();
-
-	endCombo->setCurrentIndex(oldEndComboIndex);
-	endCombo->blockSignals(endComboBlocked);
-
-	joinCombo->setCurrentIndex(oldJoinComboIndex);
-	joinCombo->blockSignals(joinComboBlocked);
+	updateCapJoinButtons();
 }
 
 void SMLineStyleWidget::languageChange()
 {
-	int  oldEndComboIndex = endCombo->currentIndex();
-	bool endComboBlocked  = endCombo->blockSignals(true);
-
-	int  oldJoinComboIndex = joinCombo->currentIndex();
-	bool joinComboBlocked  = joinCombo->blockSignals(true);
-
 	int  oldLineListRow  = lineStyles->currentRow();
 	bool lineListBlocked = lineStyles->blockSignals(true);
 
 	retranslateUi(this);
-	fillEndCombo();
-	fillJoinCombo();
+	updateCapJoinButtons();
 	updateLineList();
 
-	endCombo->setCurrentIndex(oldEndComboIndex);
-	endCombo->blockSignals(endComboBlocked);
-
-	joinCombo->setCurrentIndex(oldJoinComboIndex);
-	joinCombo->blockSignals(joinComboBlocked);
-
 	if (oldLineListRow >= 0)
 		lineStyles->setCurrentRow(oldLineListRow);
 	lineStyles->blockSignals(lineListBlocked);
@@ -103,24 +77,49 @@
 	lineWidth->setNewUnit(unitIndex);
 }
 
-void SMLineStyleWidget::fillEndCombo()
-{
-	IconManager& im  = IconManager::instance();
-
-	endCombo->clear();
-	endCombo->addItem(im.loadIcon("stroke-cap-butt"), tr( "Flat Cap" ) );
-	endCombo->addItem(im.loadIcon("stroke-cap-square"), tr( "Square Cap" ) );
-	endCombo->addItem(im.loadIcon("stroke-cap-round"), tr( "Round Cap" ) );
-}
-
-void SMLineStyleWidget::fillJoinCombo()
+void SMLineStyleWidget::setupCapJoinButtons()
 {
-	IconManager& im  = IconManager::instance();
-
-	joinCombo->clear();
-	joinCombo->addItem(im.loadIcon("stroke-join-miter"), tr( "Miter Join" ) );
-	joinCombo->addItem(im.loadIcon("stroke-join-bevel"), tr( "Bevel Join" ) );
-	joinCombo->addItem(im.loadIcon("stroke-join-round"), tr( "Round Join" ) );
+	// Cap and Join each offer 3 mutually-exclusive choices; buttons are ordered
+	// most-to-least commonly used (butt/flat and miter are the conventional
+	// defaults across vector graphics APIs - SVG, HTML canvas, PDF), matching
+	// the order the combo boxes used previously. The first (index 0) button in
+	// each row is the default selection.
+	m_capButtonGroup = new QButtonGroup(this);
+	m_capButtonGroup->setExclusive(true);
+	m_capButtonGroup->addButton(capFlatButton, 0);
+	m_capButtonGroup->addButton(capSquareButton, 1);
+	m_capButtonGroup->addButton(capRoundButton, 2);
+	capFlatButton->setChecked(true);
+	connect(m_capButtonGroup, SIGNAL(idClicked(int)), this, SLOT(slotCapButtonClicked(int)));
+
+	m_joinButtonGroup = new QButtonGroup(this);
+	m_joinButtonGroup->setExclusive(true);
+	m_joinButtonGroup->addButton(joinMiterButton, 0);
+	m_joinButtonGroup->addButton(joinBevelButton, 1);
+	m_joinButtonGroup->addButton(joinRoundButton, 2);
+	joinMiterButton->setChecked(true);
+	connect(m_joinButtonGroup, SIGNAL(idClicked(int)), this, SLOT(slotJoinButtonClicked(int)));
+
+	updateCapJoinButtons();
+}
+
+void SMLineStyleWidget::updateCapJoinButtons()
+{
+	IconManager& im = IconManager::instance();
+
+	capFlatButton->setIcon(im.loadIcon("stroke-cap-butt"));
+	capFlatButton->setToolTip( tr( "Flat Cap" ) );
+	capSquareButton->setIcon(im.loadIcon("stroke-cap-square"));
+	capSquareButton->setToolTip( tr( "Square Cap" ) );
+	capRoundButton->setIcon(im.loadIcon("stroke-cap-round"));
+	capRoundButton->setToolTip( tr( "Round Cap" ) );
+
+	joinMiterButton->setIcon(im.loadIcon("stroke-join-miter"));
+	joinMiterButton->setToolTip( tr( "Miter Join" ) );
+	joinBevelButton->setIcon(im.loadIcon("stroke-join-bevel"));
+	joinBevelButton->setToolTip( tr( "Bevel Join" ) );
+	joinRoundButton->setIcon(im.loadIcon("stroke-join-round"));
+	joinRoundButton->setToolTip( tr( "Round Join" ) );
 }
 
 void SMLineStyleWidget::showStyle(const MultiLine &lineStyle, ColorList &colorList, int subLine)
@@ -153,37 +152,52 @@
 	shadeBox->setValue(m_currentStyle[i].Shade);
 	
 	dashCombo->setCurrentIndex(m_currentStyle[i].Dash - 1);
+
+	bool capBlocked = m_capButtonGroup->blockSignals(true);
 	switch (static_cast<Qt::PenCapStyle>(m_currentStyle[i].LineEnd))
 	{
 	case Qt::FlatCap:
-		endCombo->setCurrentIndex(0);
+		capFlatButton->setChecked(true);
 		break;
 	case Qt::SquareCap:
-		endCombo->setCurrentIndex(1);
+		capSquareButton->setChecked(true);
 		break;
 	case Qt::RoundCap:
-		endCombo->setCurrentIndex(2);
+		capRoundButton->setChecked(true);
 		break;
 	default:
-		endCombo->setCurrentIndex(0);
+		capFlatButton->setChecked(true);
 		break;
 	}
+	m_capButtonGroup->blockSignals(capBlocked);
 
+	bool joinBlocked = m_joinButtonGroup->blockSignals(true);
 	switch (static_cast<Qt::PenJoinStyle>(m_currentStyle[i].LineJoin))
 	{
 	case Qt::MiterJoin:
-		joinCombo->setCurrentIndex(0);
+		joinMiterButton->setChecked(true);
 		break;
 	case Qt::BevelJoin:
-		joinCombo->setCurrentIndex(1);
+		joinBevelButton->setChecked(true);
 		break;
 	case Qt::RoundJoin:
-		joinCombo->setCurrentIndex(2);
+		joinRoundButton->setChecked(true);
 		break;
 	default:
-		joinCombo->setCurrentIndex(0);
+		joinMiterButton->setChecked(true);
 		break;
 	}
+	m_joinButtonGroup->blockSignals(joinBlocked);
+}
+
+void SMLineStyleWidget::slotCapButtonClicked(int id)
+{
+	emit capActivated(id);
+}
+
+void SMLineStyleWidget::slotJoinButtonClicked(int id)
+{
+	emit joinActivated(id);
 }
 
 void SMLineStyleWidget::updateLineList()

Index: scribus/ui/smlinestylewidget.ui
===================================================================
--- scribus/ui/smlinestylewidget.ui	(revision 27769)
+++ scribus/ui/smlinestylewidget.ui	(working copy)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>500</width>
-    <height>345</height>
+    <width>520</width>
+    <height>460</height>
    </rect>
   </property>
   <layout class="QVBoxLayout">
@@ -132,7 +132,7 @@
         <number>0</number>
        </property>
        <item>
-        <layout class="QGridLayout">
+        <layout class="QVBoxLayout" name="vboxLineStyle">
          <property name="leftMargin">
           <number>0</number>
          </property>
@@ -145,106 +145,560 @@
          <property name="bottomMargin">
           <number>0</number>
          </property>
-         <item row="3" column="0">
-          <widget class="QLabel" name="label_2">
-           <property name="text">
-            <string>Cap:</string>
-           </property>
-          </widget>
-         </item>
-         <item row="4" column="0">
-          <widget class="QLabel" name="label_3">
-           <property name="text">
-            <string>Join:</string>
-           </property>
-          </widget>
-         </item>
-         <item row="2" column="0">
-          <widget class="QLabel" name="label_4">
-           <property name="text">
-            <string>Colour:</string>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1">
-          <widget class="LineCombo" name="dashCombo"/>
-         </item>
-         <item row="3" column="1">
-          <widget class="QComboBox" name="endCombo">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="0">
-          <widget class="QLabel" name="label">
-           <property name="text">
-            <string>Style:</string>
+         <property name="spacing">
+          <number>6</number>
+         </property>
+         <item>
+          <layout class="QHBoxLayout" name="styleThicknessRowLayout">
+           <property name="spacing">
+            <number>12</number>
+           </property>
+           <item alignment="Qt::AlignmentFlag::AlignLeft">
+            <widget class="FormWidget" name="StyleFormWidget">
+             <property name="label" stdset="0">
+              <string>Style</string>
+             </property>
+             <property name="font">
+              <font>
+               <pointsize>8</pointsize>
+              </font>
+             </property>
+             <layout class="QHBoxLayout" name="styleFormLayout">
+              <property name="leftMargin">
+               <number>0</number>
+              </property>
+              <property name="topMargin">
+               <number>0</number>
+              </property>
+              <property name="rightMargin">
+               <number>0</number>
+              </property>
+              <property name="bottomMargin">
+               <number>0</number>
+              </property>
+              <item>
+               <widget class="LineCombo" name="dashCombo">
+                <property name="minimumSize">
+                 <size>
+                  <width>150</width>
+                  <height>24</height>
+                 </size>
+                </property>
+                <property name="maximumSize">
+                 <size>
+                  <width>150</width>
+                  <height>24</height>
+                 </size>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item alignment="Qt::AlignmentFlag::AlignLeft">
+            <widget class="FormWidget" name="ThicknessFormWidget">
+             <property name="label" stdset="0">
+              <string>Thickness</string>
+             </property>
+             <property name="font">
+              <font>
+               <pointsize>8</pointsize>
+              </font>
+             </property>
+             <layout class="QHBoxLayout" name="thicknessFormLayout">
+              <property name="leftMargin">
+               <number>0</number>
+              </property>
+              <property name="topMargin">
+               <number>0</number>
+              </property>
+              <property name="rightMargin">
+               <number>0</number>
+              </property>
+              <property name="bottomMargin">
+               <number>0</number>
+              </property>
+              <item>
+               <widget class="ScrSpinBox" name="lineWidth">
+                <property name="minimumSize">
+                 <size>
+                  <width>90</width>
+                  <height>24</height>
+                 </size>
+                </property>
+                <property name="maximumSize">
+                 <size>
+                  <width>90</width>
+                  <height>24</height>
+                 </size>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item>
+            <spacer name="styleThicknessRowSpacer">
+             <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>
+          <spacer name="fieldGroupGapSpacer1">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
            </property>
-          </widget>
-         </item>
-         <item row="4" column="1">
-          <widget class="QComboBox" name="joinCombo">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
            </property>
-          </widget>
-         </item>
-         <item row="2" column="1">
-          <widget class="ColorCombo" name="colorCombo"/>
-         </item>
-         <item row="2" column="2">
-          <widget class="QSpinBox" name="shadeBox">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="minimumSize">
+           <property name="sizeHint" stdset="0">
             <size>
-             <width>70</width>
-             <height>0</height>
+             <width>20</width>
+             <height>8</height>
             </size>
            </property>
-           <property name="suffix">
-            <string>%</string>
-           </property>
-           <property name="minimum">
-            <number>0</number>
-           </property>
-           <property name="maximum">
-            <number>100</number>
-           </property>
-           <property name="value">
-            <number>100</number>
-           </property>
-          </widget>
+          </spacer>
          </item>
-         <item row="1" column="0">
-          <widget class="QLabel" name="textLabel2">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
+         <item>
+          <layout class="QHBoxLayout" name="colourShadeRowLayout">
+           <property name="spacing">
+            <number>12</number>
+           </property>
+           <item alignment="Qt::AlignmentFlag::AlignLeft">
+            <widget class="FormWidget" name="ColourFormWidget">
+             <property name="label" stdset="0">
+              <string>Colour</string>
+             </property>
+             <property name="font">
+              <font>
+               <pointsize>8</pointsize>
+              </font>
+             </property>
+             <layout class="QHBoxLayout" name="colourFormLayout">
+              <property name="leftMargin">
+               <number>0</number>
+              </property>
+              <property name="topMargin">
+               <number>0</number>
+              </property>
+              <property name="rightMargin">
+               <number>0</number>
+              </property>
+              <property name="bottomMargin">
+               <number>0</number>
+              </property>
+              <item>
+               <widget class="ColorCombo" name="colorCombo">
+                <property name="minimumSize">
+                 <size>
+                  <width>150</width>
+                  <height>24</height>
+                 </size>
+                </property>
+                <property name="maximumSize">
+                 <size>
+                  <width>150</width>
+                  <height>24</height>
+                 </size>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item alignment="Qt::AlignmentFlag::AlignLeft">
+            <widget class="FormWidget" name="ShadeFormWidget">
+             <property name="label" stdset="0">
+              <string>Shade</string>
+             </property>
+             <property name="font">
+              <font>
+               <pointsize>8</pointsize>
+              </font>
+             </property>
+             <layout class="QHBoxLayout" name="shadeFormLayout">
+              <property name="leftMargin">
+               <number>0</number>
+              </property>
+              <property name="topMargin">
+               <number>0</number>
+              </property>
+              <property name="rightMargin">
+               <number>0</number>
+              </property>
+              <property name="bottomMargin">
+               <number>0</number>
+              </property>
+              <item>
+               <widget class="QSpinBox" name="shadeBox">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="minimumSize">
+                 <size>
+                  <width>75</width>
+                  <height>24</height>
+                 </size>
+                </property>
+                <property name="maximumSize">
+                 <size>
+                  <width>75</width>
+                  <height>24</height>
+                 </size>
+                </property>
+                <property name="suffix">
+                 <string>%</string>
+                </property>
+                <property name="minimum">
+                 <number>0</number>
+                </property>
+                <property name="maximum">
+                 <number>100</number>
+                </property>
+                <property name="value">
+                 <number>100</number>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item>
+            <spacer name="colourShadeRowSpacer">
+             <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>
+          <spacer name="fieldGroupGapSpacer2">
+           <property name="orientation">
+            <enum>Qt::Vertical</enum>
            </property>
-           <property name="text">
-            <string>Width:</string>
+           <property name="sizeType">
+            <enum>QSizePolicy::Fixed</enum>
            </property>
-           <property name="wordWrap">
-            <bool>false</bool>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>20</width>
+             <height>8</height>
+            </size>
            </property>
-          </widget>
+          </spacer>
          </item>
-         <item row="1" column="1">
-          <widget class="ScrSpinBox" name="lineWidth"/>
+         <item>
+          <layout class="QHBoxLayout" name="capJoinRowLayout">
+           <property name="spacing">
+            <number>12</number>
+           </property>
+           <item alignment="Qt::AlignmentFlag::AlignLeft">
+            <widget class="FormWidget" name="CapFormWidget">
+             <property name="label" stdset="0">
+              <string>Cap</string>
+             </property>
+             <property name="font">
+              <font>
+               <pointsize>8</pointsize>
+              </font>
+             </property>
+             <layout class="QHBoxLayout" name="capFormLayout">
+              <property name="leftMargin">
+               <number>0</number>
+              </property>
+              <property name="topMargin">
+               <number>0</number>
+              </property>
+              <property name="rightMargin">
+               <number>0</number>
+              </property>
+              <property name="bottomMargin">
+               <number>0</number>
+              </property>
+              <item>
+               <widget class="QFrame" name="capButtonFrame">
+                <property name="frameShape">
+                 <enum>QFrame::Shape::StyledPanel</enum>
+                </property>
+                <property name="frameShadow">
+                 <enum>QFrame::Shadow::Sunken</enum>
+                </property>
+                <layout class="QHBoxLayout" name="capButtonRowLayout">
+                 <property name="spacing">
+                  <number>0</number>
+                 </property>
+                 <property name="leftMargin">
+                  <number>2</number>
+                 </property>
+                 <property name="topMargin">
+                  <number>2</number>
+                 </property>
+                 <property name="rightMargin">
+                  <number>2</number>
+                 </property>
+                 <property name="bottomMargin">
+                  <number>2</number>
+                 </property>
+                 <item>
+                  <widget class="QToolButton" name="capFlatButton">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="maximumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="checkable">
+                    <bool>true</bool>
+                   </property>
+                   <property name="autoRaise">
+                    <bool>true</bool>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QToolButton" name="capSquareButton">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="maximumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="checkable">
+                    <bool>true</bool>
+                   </property>
+                   <property name="autoRaise">
+                    <bool>true</bool>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QToolButton" name="capRoundButton">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="maximumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="checkable">
+                    <bool>true</bool>
+                   </property>
+                   <property name="autoRaise">
+                    <bool>true</bool>
+                   </property>
+                  </widget>
+                 </item>
+                </layout>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item alignment="Qt::AlignmentFlag::AlignLeft">
+            <widget class="FormWidget" name="JoinFormWidget">
+             <property name="label" stdset="0">
+              <string>Join</string>
+             </property>
+             <property name="font">
+              <font>
+               <pointsize>8</pointsize>
+              </font>
+             </property>
+             <layout class="QHBoxLayout" name="joinFormLayout">
+              <property name="leftMargin">
+               <number>0</number>
+              </property>
+              <property name="topMargin">
+               <number>0</number>
+              </property>
+              <property name="rightMargin">
+               <number>0</number>
+              </property>
+              <property name="bottomMargin">
+               <number>0</number>
+              </property>
+              <item>
+               <widget class="QFrame" name="joinButtonFrame">
+                <property name="frameShape">
+                 <enum>QFrame::Shape::StyledPanel</enum>
+                </property>
+                <property name="frameShadow">
+                 <enum>QFrame::Shadow::Sunken</enum>
+                </property>
+                <layout class="QHBoxLayout" name="joinButtonRowLayout">
+                 <property name="spacing">
+                  <number>0</number>
+                 </property>
+                 <property name="leftMargin">
+                  <number>2</number>
+                 </property>
+                 <property name="topMargin">
+                  <number>2</number>
+                 </property>
+                 <property name="rightMargin">
+                  <number>2</number>
+                 </property>
+                 <property name="bottomMargin">
+                  <number>2</number>
+                 </property>
+                 <item>
+                  <widget class="QToolButton" name="joinMiterButton">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="maximumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="checkable">
+                    <bool>true</bool>
+                   </property>
+                   <property name="autoRaise">
+                    <bool>true</bool>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QToolButton" name="joinBevelButton">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="maximumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="checkable">
+                    <bool>true</bool>
+                   </property>
+                   <property name="autoRaise">
+                    <bool>true</bool>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QToolButton" name="joinRoundButton">
+                   <property name="sizePolicy">
+                    <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+                     <horstretch>0</horstretch>
+                     <verstretch>0</verstretch>
+                    </sizepolicy>
+                   </property>
+                   <property name="minimumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="maximumSize">
+                    <size>
+                     <width>28</width>
+                     <height>26</height>
+                    </size>
+                   </property>
+                   <property name="checkable">
+                    <bool>true</bool>
+                   </property>
+                   <property name="autoRaise">
+                    <bool>true</bool>
+                   </property>
+                  </widget>
+                 </item>
+                </layout>
+               </widget>
+              </item>
+             </layout>
+            </widget>
+           </item>
+           <item>
+            <spacer name="capJoinRowSpacer">
+             <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>
         </layout>
        </item>
@@ -265,32 +719,40 @@
         </spacer>
        </item>
        <item>
-        <widget class="QLabel" name="label_5">
-         <property name="text">
+        <widget class="QGroupBox" name="groupPreview">
+         <property name="title">
           <string>Preview</string>
          </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="previewLabel">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="minimumSize">
-          <size>
-           <width>0</width>
-           <height>60</height>
-          </size>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-         <property name="wordWrap">
-          <bool>false</bool>
-         </property>
+         <layout class="QVBoxLayout" name="previewGroupLayout">
+          <item>
+           <widget class="QLabel" name="previewLabel">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="minimumSize">
+             <size>
+              <width>0</width>
+              <height>60</height>
+             </size>
+            </property>
+            <property name="frameShape">
+             <enum>QFrame::Shape::StyledPanel</enum>
+            </property>
+            <property name="frameShadow">
+             <enum>QFrame::Shadow::Sunken</enum>
+            </property>
+            <property name="text">
+             <string/>
+            </property>
+            <property name="wordWrap">
+             <bool>false</bool>
+            </property>
+           </widget>
+          </item>
+         </layout>
         </widget>
        </item>
        <item>
@@ -317,6 +779,12 @@
  </widget>
  <customwidgets>
   <customwidget>
+   <class>FormWidget</class>
+   <extends>QWidget</extends>
+   <header>ui/widgets/form_widget.h</header>
+   <container>1</container>
+  </customwidget>
+  <customwidget>
    <class>LineCombo</class>
    <extends>QComboBox</extends>
    <header>ui/linecombo.h</header>

Index: scribus/ui/smlinestyle.cpp
===================================================================
--- scribus/ui/smlinestyle.cpp	(revision 27769)
+++ scribus/ui/smlinestyle.cpp	(working copy)
@@ -411,8 +411,8 @@
 {
 	connect(m_widget->addButton, SIGNAL(clicked()), this, SLOT(slotAddLine()));
 	connect(m_widget->removeButton, SIGNAL(clicked()), this, SLOT(slotDeleteLine()));
-	connect(m_widget->endCombo, SIGNAL(activated(int)), this, SLOT(slotSetEnd(int)));
-	connect(m_widget->joinCombo, SIGNAL(activated(int)), this, SLOT(slotSetJoin(int)));
+	connect(m_widget, SIGNAL(capActivated(int)), this, SLOT(slotSetEnd(int)));
+	connect(m_widget, SIGNAL(joinActivated(int)), this, SLOT(slotSetJoin(int)));
 	connect(m_widget->colorCombo, SIGNAL(textActivated(QString)), this, SLOT(slotColor(QString)));
 	connect(m_widget->dashCombo, SIGNAL(activated(int)), this, SLOT(slotLineStyle(int)));
 	connect(m_widget->shadeBox, SIGNAL(valueChanged(int)), this, SLOT(slotShade(int)));
@@ -423,8 +423,8 @@
 {
 	disconnect(m_widget->addButton, SIGNAL(clicked()), this, SLOT(slotAddLine()));
 	disconnect(m_widget->removeButton, SIGNAL(clicked()), this, SLOT(slotDeleteLine()));
-	disconnect(m_widget->endCombo, SIGNAL(activated(int)), this, SLOT(slotSetEnd(int)));
-	disconnect(m_widget->joinCombo, SIGNAL(activated(int)), this, SLOT(slotSetJoin(int)));
+	disconnect(m_widget, SIGNAL(capActivated(int)), this, SLOT(slotSetEnd(int)));
+	disconnect(m_widget, SIGNAL(joinActivated(int)), this, SLOT(slotSetJoin(int)));
 	disconnect(m_widget->colorCombo, SIGNAL(textActivated(QString)), this, SLOT(slotColor(QString)));
 	disconnect(m_widget->dashCombo, SIGNAL(activated(int)), this, SLOT(slotLineStyle(int)));
 	disconnect(m_widget->shadeBox, SIGNAL(valueChanged(int)), this, SLOT(slotShade(int)));
@@ -709,7 +709,7 @@
 	if (m_selection.count() < 1)
 		return;
 	
-	QPixmap pm(200, 37);
+	QPixmap pm(242, 37);
 	pm.fill(Qt::white);
 	QPainter p;
 	p.begin(&pm);
@@ -732,7 +732,7 @@
 		pen.setCapStyle(static_cast<Qt::PenCapStyle>(singleLine.LineEnd));
 		pen.setJoinStyle(static_cast<Qt::PenJoinStyle>(singleLine.LineJoin));
 		p.setPen(pen);
-		p.drawLine(17, 18, 183, 18);
+		p.drawLine(17, 18, 225, 18);
 	}
 	p.end();
 	m_widget->previewLabel->setPixmap(pm);

linestyle_editor_ui_v1.4.patch (36,598 bytes)   
PatchYes

Activities

qirat

2026-08-10 07:49

reporter   ~0054190

- buttons instead of drop-downs for Cap and Join
- overall polish
linestylewidget-ui-new.png (183,624 bytes)   
linestylewidget-ui-new.png (183,624 bytes)   

Issue History

Date Modified Username Field Change
2026-08-10 07:47 qirat New Issue
2026-08-10 07:47 qirat File Added: linestyle_editor_ui_v1.4.patch
2026-08-10 07:49 qirat Note Added: 0054190
2026-08-10 07:49 qirat File Added: linestylewidget-ui-new.png