r24547 by jghali - #16501: Update layout for Style Manager: fontcombo, styleselect, tabruler <bubu>

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 6 11:56:23 UTC 2021


Author: jghali
Date: Sat Mar  6 11:56:23 2021
New Revision: 24547

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24547
Log:
#16501: Update layout for Style Manager: fontcombo, styleselect, tabruler <bubu>

Added:
    trunk/Scribus/resources/iconsets/1_5_0/16/edit-delete-all.png   (with props)
    trunk/Scribus/resources/iconsets/1_5_1/16/edit-delete-all.png   (with props)
    trunk/Scribus/resources/iconsets/1_5_1_dark/16/edit-delete-all.png   (with props)
Modified:
    trunk/Scribus/scribus/ui/fontcombo.cpp
    trunk/Scribus/scribus/ui/smcstylewidget.ui
    trunk/Scribus/scribus/ui/smpstylewidget.ui
    trunk/Scribus/scribus/ui/smtabruler.cpp
    trunk/Scribus/scribus/ui/styleselect.cpp
    trunk/Scribus/scribus/ui/tabruler.cpp
    trunk/Scribus/scribus/ui/tabruler.h

Modified: trunk/Scribus/scribus/ui/fontcombo.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24547&path=/trunk/Scribus/scribus/ui/fontcombo.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/fontcombo.cpp	(original)
+++ trunk/Scribus/scribus/ui/fontcombo.cpp	Sat Mar  6 11:56:23 2021
@@ -118,7 +118,10 @@
 	substFont = IconManager::instance().loadPixmap("font_subst16.png");
 	fontComboLayout = new QGridLayout(this);
 	fontComboLayout->setContentsMargins(0, 0, 0, 0);
-	fontComboLayout->setSpacing(0);
+	if (showLabels)
+		fontComboLayout->setSpacing(6);
+	else
+		fontComboLayout->setSpacing(3);
 	int col = 0;
 	if (showLabels)
 	{

Modified: trunk/Scribus/scribus/ui/smcstylewidget.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24547&path=/trunk/Scribus/scribus/ui/smcstylewidget.ui
==============================================================================
--- trunk/Scribus/scribus/ui/smcstylewidget.ui	(original)
+++ trunk/Scribus/scribus/ui/smcstylewidget.ui	Sat Mar  6 11:56:23 2021
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>402</width>
-    <height>563</height>
+    <width>430</width>
+    <height>601</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -242,22 +242,6 @@
               </item>
              </layout>
             </item>
-            <item>
-             <spacer>
-              <property name="orientation">
-               <enum>Qt::Vertical</enum>
-              </property>
-              <property name="sizeType">
-               <enum>QSizePolicy::MinimumExpanding</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>300</width>
-                <height>0</height>
-               </size>
-              </property>
-             </spacer>
-            </item>
            </layout>
           </widget>
          </item>
@@ -435,22 +419,6 @@
               </item>
              </layout>
             </item>
-            <item>
-             <spacer>
-              <property name="orientation">
-               <enum>Qt::Vertical</enum>
-              </property>
-              <property name="sizeType">
-               <enum>QSizePolicy::MinimumExpanding</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>300</width>
-                <height>0</height>
-               </size>
-              </property>
-             </spacer>
-            </item>
            </layout>
           </widget>
          </item>
@@ -470,7 +438,14 @@
                </widget>
               </item>
               <item>
-               <widget class="SMLineEdit" name="hyphenCharLineEdit"/>
+               <widget class="SMLineEdit" name="hyphenCharLineEdit">
+                <property name="maximumSize">
+                 <size>
+                  <width>60</width>
+                  <height>16777215</height>
+                 </size>
+                </property>
+               </widget>
               </item>
               <item>
                <spacer name="horizontalSpacer_2">
@@ -772,6 +747,22 @@
           </widget>
          </item>
         </layout>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeType">
+          <enum>QSizePolicy::MinimumExpanding</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>300</width>
+           <height>0</height>
+          </size>
+         </property>
+        </spacer>
        </item>
       </layout>
      </widget>

Modified: trunk/Scribus/scribus/ui/smpstylewidget.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24547&path=/trunk/Scribus/scribus/ui/smpstylewidget.ui
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.ui	(original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.ui	Sat Mar  6 11:56:23 2021
@@ -4,13 +4,13 @@
  <widget class="QWidget" name="SMPStyleWidget">
   <property name="geometry">
    <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>695</width>
-    <height>582</height>
-   </rect>
-  </property>
-  <layout class="QVBoxLayout">
+    <x>0</x>
+    <y>0</y>
+    <width>695</width>
+    <height>596</height>
+   </rect>
+  </property>
+  <layout class="QVBoxLayout">
    <item>
     <widget class="QTabWidget" name="tabWidget">
      <property name="currentIndex">
@@ -248,12 +248,25 @@
                  </size>
                 </property>
                </spacer>
-              </item>
-             </layout>
-            </item>
-           </layout>
-          </widget>
-         </item>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <spacer name="verticalSpacer_3">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>20</width>
+                <height>0</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </widget>
+         </item>
          <item row="0" column="1">
           <widget class="QGroupBox" name="textFlowBox">
            <property name="sizePolicy">
@@ -369,33 +382,22 @@
          <item row="1" column="0">
           <widget class="QGroupBox" name="opticalMarginsGroupBox">
            <property name="title">
-            <string>Optical Margins</string>
-           </property>
-           <layout class="QGridLayout" name="gridLayout_3">
-            <item row="6" column="0" colspan="2">
-             <layout class="QHBoxLayout" name="horizontalLayout_4">
-              <item>
-               <widget class="QPushButton" name="optMarginDefaultButton">
-                <property name="text">
-                 <string>Reset to Default</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QPushButton" name="optMarginParentButton">
-                <property name="text">
-                 <string>Use Parent Value</string>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </item>
-            <item row="1" column="0" colspan="2">
-             <layout class="QGridLayout" name="gridLayout_5">
-              <item row="0" column="1">
-               <widget class="SMRadioButton" name="optMarginRadioBoth">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+            <string>Optical Margins</string>
+           </property>
+           <layout class="QGridLayout" name="gridLayout_3">
+            <item row="1" column="0" colspan="2">
+             <layout class="QGridLayout" name="gridLayout_5">
+              <item row="2" column="0">
+               <widget class="SMRadioButton" name="optMarginRadioLeft">
+                <property name="text">
+                 <string>Left Only</string>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="0">
+               <widget class="SMRadioButton" name="optMarginRadioBoth">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
                   <horstretch>0</horstretch>
                   <verstretch>0</verstretch>
                  </sizepolicy>
@@ -418,32 +420,39 @@
                 </property>
                 <property name="checked">
                  <bool>true</bool>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="0">
-               <widget class="SMRadioButton" name="optMarginRadioLeft">
-                <property name="text">
-                 <string>Left Only</string>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="1">
-               <widget class="SMRadioButton" name="optMarginRadioRight">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+                </property>
+               </widget>
+              </item>
+              <item row="3" column="0">
+               <widget class="SMRadioButton" name="optMarginRadioRight">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
                   <horstretch>0</horstretch>
                   <verstretch>0</verstretch>
                  </sizepolicy>
                 </property>
                 <property name="text">
                  <string>Right Only</string>
-                </property>
-               </widget>
-              </item>
-             </layout>
-            </item>
-           </layout>
+                </property>
+               </widget>
+              </item>
+              <item row="0" column="1">
+               <widget class="QPushButton" name="optMarginDefaultButton">
+                <property name="text">
+                 <string>Reset to Default</string>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="1">
+               <widget class="QPushButton" name="optMarginParentButton">
+                <property name="text">
+                 <string>Use Parent Value</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+           </layout>
           </widget>
          </item>
          <item row="1" column="1">

Modified: trunk/Scribus/scribus/ui/smtabruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24547&path=/trunk/Scribus/scribus/ui/smtabruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtabruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/smtabruler.cpp	Sat Mar  6 11:56:23 2021
@@ -33,20 +33,20 @@
 
 	indentLayout->removeWidget(firstLineData);
 	firstLineData->hide();
-	indentLayout->insertWidget(1, firstLineSpin);
-	firstLineSpin->show();
-
-	layout4->removeWidget(leftIndentData);
-	leftIndentData->hide();
-	layout4->insertWidget(1, leftIndentSpin);
-	leftIndentSpin->show();
-
-	indentLayout->removeWidget(rightIndentData);
-	rightIndentData->hide();
-	indentLayout->insertWidget(3, rightIndentSpin);
-	rightIndentSpin->show();
-
-	connect(firstLineData, SIGNAL(valueChanged(double)), this, SLOT(firstDataChanged()));
+	indentLayout->insertWidget(1, firstLineSpin);
+	firstLineSpin->show();
+
+	indentLayout->removeWidget(leftIndentData);
+	leftIndentData->hide();
+	indentLayout->insertWidget(3, leftIndentSpin);
+	leftIndentSpin->show();
+
+	indentLayout->removeWidget(rightIndentData);
+	rightIndentData->hide();
+	indentLayout->insertWidget(5, rightIndentSpin);
+	rightIndentSpin->show();
+
+	connect(firstLineData, SIGNAL(valueChanged(double)), this, SLOT(firstDataChanged()));
 	connect(rightIndentData, SIGNAL(valueChanged(double)), this, SLOT(rightDataChanged()));
 	connect(leftIndentData, SIGNAL(valueChanged(double)), this, SLOT(leftDataChanged()));
 

Modified: trunk/Scribus/scribus/ui/styleselect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24547&path=/trunk/Scribus/scribus/ui/styleselect.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/styleselect.cpp	(original)
+++ trunk/Scribus/scribus/ui/styleselect.cpp	Sat Mar  6 11:56:23 2021
@@ -14,8 +14,8 @@
 StrikeValues::StrikeValues( QWidget* parent ) : QFrame( parent )
 {
 	group1Layout = new QGridLayout( this );
-	group1Layout->setSpacing( 3 );
-	group1Layout->setContentsMargins(2, 2, 2, 2);
+	group1Layout->setSpacing(3);
+	group1Layout->setContentsMargins(3, 3, 3, 3);
 	group1Layout->setAlignment( Qt::AlignTop );
 	LPos = new ScrSpinBox( -0.1, 100, this, 0 );
 	LPos->setValue( -0.1 );
@@ -47,8 +47,8 @@
 UnderlineValues::UnderlineValues( QWidget* parent ) : QFrame( parent )
 {
 	group1Layout = new QGridLayout(this);
-	group1Layout->setSpacing( 3 );
-	group1Layout->setContentsMargins(2, 2, 2, 2);
+	group1Layout->setSpacing(3);
+	group1Layout->setContentsMargins(3, 3, 3, 3);
 	group1Layout->setAlignment( Qt::AlignTop );
 	LPos = new ScrSpinBox( -0.1, 100, this, 0 );
 	LPos->setValue( -0.1 );
@@ -80,8 +80,8 @@
 OutlineValues::OutlineValues( QWidget* parent ) : QFrame( parent )
 {
 	group1Layout = new QGridLayout( this );
-	group1Layout->setSpacing( 3 );
-	group1Layout->setContentsMargins(2, 2, 2, 2);
+	group1Layout->setSpacing(3);
+	group1Layout->setContentsMargins(3, 3, 3, 3);
 	group1Layout->setAlignment( Qt::AlignTop );
 	LWidth = new ScrSpinBox( 0, 100, this, 0 );
 	LWidth->setValue( 1 );
@@ -101,8 +101,8 @@
 ShadowValues::ShadowValues( QWidget* parent ) : QFrame( parent )
 {
 	group1Layout = new QGridLayout( this );
-	group1Layout->setSpacing( 3 );
-	group1Layout->setContentsMargins(2, 2, 2, 2);
+	group1Layout->setSpacing(3);
+	group1Layout->setContentsMargins(3, 3, 3, 3);
 	group1Layout->setAlignment( Qt::AlignTop );
 	Xoffset = new ScrSpinBox( -100, 100, this, 0 );
 	Xoffset->setValue( 5 );
@@ -131,7 +131,7 @@
 {
 	IconManager& im = IconManager::instance();
 	ssLayout = new QHBoxLayout(this);
-	ssLayout->setSpacing( 0 );
+	ssLayout->setSpacing(3);
 	ssLayout->setContentsMargins(0, 0, 0, 0);
 
 	UnderlineVal = new UnderlineValues( nullptr );

Modified: trunk/Scribus/scribus/ui/tabruler.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24547&path=/trunk/Scribus/scribus/ui/tabruler.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabruler.cpp	(original)
+++ trunk/Scribus/scribus/ui/tabruler.cpp	Sat Mar  6 11:56:23 2021
@@ -557,10 +557,19 @@
 	tabFillComboT->setBuddy(tabFillCombo);
 	layout1->addWidget( tabFillComboT );
 	layout1->addWidget( tabFillCombo );
-
-	layout4 = new QHBoxLayout;
-	layout4->setContentsMargins(0, 0, 0, 0);
-	layout4->setSpacing(6);
+	clearOneButton = new QPushButton( this );
+	clearOneButton->setText("");
+	clearOneButton->setIcon(IconManager::instance().loadIcon("16/edit-delete.png"));
+	clearOneButton->setMinimumSize(24, 24);
+	clearOneButton->setMaximumSize(24, 24);
+	layout1->addSpacing(12);
+	layout1->addWidget(clearOneButton);
+	clearButton = new QPushButton( this );
+	clearButton->setText("");
+	clearButton->setIcon(IconManager::instance().loadIcon("16/edit-delete-all.png"));
+	clearButton->setMinimumSize(24, 24);
+	clearButton->setMaximumSize(24, 24);
+	layout1->addWidget(clearButton);
 
 	indentLayout = new QHBoxLayout;
 	indentLayout->setContentsMargins(0, 0, 0, 0);
@@ -579,9 +588,8 @@
 		leftIndentLabel = new QLabel(this);
 		leftIndentLabel->setText("");
 		leftIndentLabel->setPixmap(IconManager::instance().loadPixmap("leftindent.png"));
-		layout4->addWidget( leftIndentLabel );
-		layout4->addWidget( leftIndentData );
-		layout4->addStretch(10);
+		indentLayout->addWidget(leftIndentLabel);
+		indentLayout->addWidget(leftIndentData);
 		rightIndentLabel = new QLabel(this);
 		rightIndentLabel->setText("");
 		rightIndentLabel->setPixmap(IconManager::instance().loadPixmap("rightindent.png"));
@@ -590,14 +598,6 @@
 		indentLayout->addWidget(rightIndentLabel);
 		indentLayout->addWidget(rightIndentData);
 	}
-	clearButton = new QPushButton( this );
-	clearButton->setText( tr( "Delete All" ) );
-	indentLayout->addSpacing(20);
-	indentLayout->addWidget( clearButton);
-	clearOneButton = new QPushButton( this );
-	clearOneButton->setText( tr( "Delete Selected" ) );
-	indentLayout->addWidget( clearOneButton);
-	indentLayout->addStretch(10);
 	if (!haveFirst)
 	{
 		QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
@@ -609,7 +609,6 @@
 	tabrulerLayout->addLayout( layout2 );
 	indentLayout->addStretch( 10 );
 	tabrulerLayout->addLayout( indentLayout );
-	tabrulerLayout->addLayout(layout4);
 
 	tabData->setEnabled(false);
 	tabFillCombo->setEnabled(false);
@@ -701,9 +700,13 @@
 
 	if (leftIndentLabel)
 		leftIndentLabel->setPixmap(iconManager.loadPixmap("leftindent.png"));
-	
+
 	if (rightIndentLabel)
 		rightIndentLabel->setPixmap(iconManager.loadPixmap("rightindent.png"));
+
+	clearOneButton->setIcon(iconManager.loadIcon("16/edit-delete.png"));
+	clearButton->setIcon(iconManager.loadIcon("16/edit-delete-all.png"));
+
 }
 
 void Tabruler::languageChange()

Modified: trunk/Scribus/scribus/ui/tabruler.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24547&path=/trunk/Scribus/scribus/ui/tabruler.h
==============================================================================
--- trunk/Scribus/scribus/ui/tabruler.h	(original)
+++ trunk/Scribus/scribus/ui/tabruler.h	Sat Mar  6 11:56:23 2021
@@ -142,8 +142,6 @@
 	QHBoxLayout* layout2 { nullptr };
 	QHBoxLayout* layout1 { nullptr };
 	QHBoxLayout* indentLayout { nullptr };
-//	QVBoxLayout* layout3 { nullptr };
-	QHBoxLayout* layout4 { nullptr };
 	QComboBox* typeCombo { nullptr };
 	QComboBox* tabFillCombo { nullptr };
 	QLabel* tabFillComboT { nullptr };




More information about the scribus-commit mailing list