r14436 by cbradney - Adjust PolygonWidget to work with new prefs dialog, including rename variables. Use the PolygonWidget in new prefs.

scribus-commit scribus-commit at lists.scribus.net
Sun Dec 20 00:15:31 CET 2009


Revision: 14436
Author: cbradney
Date: 2009-12-19T11:34:13.183825Z
Commit message: Adjust PolygonWidget to work with new prefs dialog, including rename variables. Use the PolygonWidget in new prefs.

Changeset: 
M  /trunk/Scribus/scribus/ui/polygonwidget.cpp
M  /trunk/Scribus/scribus/ui/prefs_itemtools.cpp
M  /trunk/Scribus/scribus/ui/polygonwidget.h
M  /trunk/Scribus/scribus/ui/prefs_itemtoolsbase.ui
M  /trunk/Scribus/scribus/ui/prefs_guidesbase.ui
M  /trunk/Scribus/scribus/ui/cmsprefsbase.ui

Diffs:
Index: scribus/ui/polygonwidget.h
===================================================================
--- scribus/ui/polygonwidget.h	(revision 14435)
+++ scribus/ui/polygonwidget.h	(revision 14436)
@@ -16,23 +16,27 @@
 	Q_OBJECT
 
 	public:
+		PolygonWidget(QWidget* parent);
 		PolygonWidget(QWidget* parent, int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature);
 		~PolygonWidget() {};
 
+		void setValues(int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature);
 		void getValues(int* polyCorners, int* polyFd, double* polyF, bool* polyUseConvexFactor, double* polyRotation, double* polyCurvature);
 		void restoreDefaults(struct ItemToolPrefs *prefsData);
+		void saveGuiToPrefs(struct ItemToolPrefs *prefsData);
 
 	protected slots:
 		void setFactorSlider(int a);
 		void setRotationSlider(int a);
 		void setCurvatureSlider(int a);
-		void UpdatePreview();
+		void updatePreview();
 		double GetZeroFactor();
 		double GetMaxFactor();
 		double GetFactor();
 
 	protected:
 		double PFactor;
+		void connectSignals(bool);
 };
 
 #endif
Index: scribus/ui/polygonwidget.cpp
===================================================================
--- scribus/ui/polygonwidget.cpp	(revision 14435)
+++ scribus/ui/polygonwidget.cpp	(revision 14436)
@@ -19,51 +19,61 @@
 #include "util_math.h"
 #include "prefsstructs.h"
 
-
 using namespace std;
 
+PolygonWidget::PolygonWidget(QWidget* parent)
+		 : QWidget( parent )
+{
+	setupUi(this);
+}
+
+
 PolygonWidget::PolygonWidget(QWidget* parent, int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature) : QWidget( parent )
 {
 	setupUi(this);
-	PFactor = polyF;
-	cornersSpinBox->setValue(polyCorners);
-	rotationSpinBox->setValue(static_cast<int>(polyRotation));
-	rotationSlider->setValue(static_cast<int>(polyRotation));
-	applyConvexGroupBox->setChecked(polyUseConvexFactor);
-	factorSpinBox->setValue(polyFd);
-	factorSlider->setValue(polyFd);
-	applyConvexGroupBox->setChecked(polyUseConvexFactor);
-	curvatureSpinBox->setValue(qRound(polyCurvature * 100));
-	curvatureSlider->setValue(qRound(polyCurvature * 100));
-
-	UpdatePreview();
+	setValues(polyCorners, polyFd, polyF, polyUseConvexFactor, polyRotation, polyCurvature);
+	updatePreview();
 	// signals and slots connections
-	connect(factorSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setFactorSlider(int)));
-	connect(rotationSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setRotationSlider(int)));
-	connect(factorSlider, SIGNAL(valueChanged(int)), factorSpinBox, SLOT(setValue(int)));
-	connect(factorSlider, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
-	connect(rotationSlider, SIGNAL(valueChanged(int)), rotationSpinBox, SLOT(setValue(int)));
-	connect(rotationSlider, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
-	connect(cornersSpinBox, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
-	connect(applyConvexGroupBox, SIGNAL(clicked()), this, SLOT(UpdatePreview()));
-	connect(curvatureSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setCurvatureSlider(int)));
-	connect(curvatureSlider, SIGNAL(valueChanged(int)), curvatureSpinBox, SLOT(setValue(int)));
-	connect(curvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
+	connectSignals(true);
 }
 
+
+void PolygonWidget::connectSignals(bool conn)
+{
+	if (conn)
+	{
+		connect(factorSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setFactorSlider(int)));
+		connect(rotationSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setRotationSlider(int)));
+		connect(factorSlider, SIGNAL(valueChanged(int)), factorSpinBox, SLOT(setValue(int)));
+		connect(factorSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		connect(rotationSlider, SIGNAL(valueChanged(int)), rotationSpinBox, SLOT(setValue(int)));
+		connect(rotationSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		connect(cornersSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		connect(applyConvexGroupBox, SIGNAL(clicked()), this, SLOT(updatePreview()));
+		connect(curvatureSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setCurvatureSlider(int)));
+		connect(curvatureSlider, SIGNAL(valueChanged(int)), curvatureSpinBox, SLOT(setValue(int)));
+		connect(curvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+	}
+	else
+	{
+		disconnect(factorSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setFactorSlider(int)));
+		disconnect(rotationSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setRotationSlider(int)));
+		disconnect(factorSlider, SIGNAL(valueChanged(int)), factorSpinBox, SLOT(setValue(int)));
+		disconnect(factorSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		disconnect(rotationSlider, SIGNAL(valueChanged(int)), rotationSpinBox, SLOT(setValue(int)));
+		disconnect(rotationSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		disconnect(cornersSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		disconnect(applyConvexGroupBox, SIGNAL(clicked()), this, SLOT(updatePreview()));
+		disconnect(curvatureSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setCurvatureSlider(int)));
+		disconnect(curvatureSlider, SIGNAL(valueChanged(int)), curvatureSpinBox, SLOT(setValue(int)));
+		disconnect(curvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+	}
+}
+
+
 void PolygonWidget::restoreDefaults(struct ItemToolPrefs *prefsData)
 {
-	disconnect(factorSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setFactorSlider(int)));
-	disconnect(rotationSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setRotationSlider(int)));
-	disconnect(factorSlider, SIGNAL(valueChanged(int)), factorSpinBox, SLOT(setValue(int)));
-	disconnect(factorSlider, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
-	disconnect(rotationSlider, SIGNAL(valueChanged(int)), rotationSpinBox, SLOT(setValue(int)));
-	disconnect(rotationSlider, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
-	disconnect(cornersSpinBox, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
-	disconnect(applyConvexGroupBox, SIGNAL(clicked()), this, SLOT(UpdatePreview()));
-	disconnect(curvatureSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setCurvatureSlider(int)));
-	disconnect(curvatureSlider, SIGNAL(valueChanged(int)), curvatureSpinBox, SLOT(setValue(int)));
-	disconnect(curvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
+	connectSignals(false);
 	PFactor = prefsData->polyFactor;
 	cornersSpinBox->setValue(prefsData->polyCorners);
 	rotationSpinBox->setValue(static_cast<int>(prefsData->polyRotation));
@@ -74,20 +84,34 @@
 	applyConvexGroupBox->setChecked(prefsData->polyUseFactor);
 	curvatureSpinBox->setValue(qRound(prefsData->polyCurvature * 100));
 	curvatureSlider->setValue(qRound(prefsData->polyCurvature * 100));
-	UpdatePreview();
-	connect(factorSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setFactorSlider(int)));
-	connect(rotationSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setRotationSlider(int)));
-	connect(factorSlider, SIGNAL(valueChanged(int)), factorSpinBox, SLOT(setValue(int)));
-	connect(factorSlider, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
-	connect(rotationSlider, SIGNAL(valueChanged(int)), rotationSpinBox, SLOT(setValue(int)));
-	connect(rotationSlider, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
-	connect(cornersSpinBox, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
-	connect(applyConvexGroupBox, SIGNAL(clicked()), this, SLOT(UpdatePreview()));
-	connect(curvatureSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setCurvatureSlider(int)));
-	connect(curvatureSlider, SIGNAL(valueChanged(int)), curvatureSpinBox, SLOT(setValue(int)));
-	connect(curvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(UpdatePreview()));
+	updatePreview();
+	connectSignals(true);
 }
 
+void PolygonWidget::saveGuiToPrefs(struct ItemToolPrefs *prefsData)
+{
+	prefsData->polyCorners = cornersSpinBox->value();
+	prefsData->polyFactor = PFactor;
+	prefsData->polyUseFactor = applyConvexGroupBox->isChecked();
+	prefsData->polyFactorGuiVal = factorSlider->value();
+	prefsData->polyRotation = rotationSpinBox->value();
+	prefsData->polyCurvature = curvatureSpinBox->value() / 100.0;
+}
+
+void PolygonWidget::setValues(int polyCorners, int polyFd, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature)
+{
+	PFactor = polyF;
+	cornersSpinBox->setValue(polyCorners);
+	rotationSpinBox->setValue(static_cast<int>(polyRotation));
+	rotationSlider->setValue(static_cast<int>(polyRotation));
+	applyConvexGroupBox->setChecked(polyUseConvexFactor);
+	factorSpinBox->setValue(polyFd);
+	factorSlider->setValue(polyFd);
+	applyConvexGroupBox->setChecked(polyUseConvexFactor);
+	curvatureSpinBox->setValue(qRound(polyCurvature * 100));
+	curvatureSlider->setValue(qRound(polyCurvature * 100));
+}
+
 void PolygonWidget::getValues(int* polyCorners, int* polyFd, double* polyF, bool* polyUseConvexFactor, double* polyRotation, double* polyCurvature)
 {
 	*polyCorners = cornersSpinBox->value();
@@ -119,7 +143,7 @@
 	connect(curvatureSlider, SIGNAL(valueChanged(int)), curvatureSpinBox, SLOT(setValue(int)));
 }
 
-void PolygonWidget::UpdatePreview()
+void PolygonWidget::updatePreview()
 {
 	double roundness = curvatureSpinBox->value() / 100.0;
 	QPixmap pm = QPixmap(Preview->width() - 5, Preview->height() - 5);
Index: scribus/ui/prefs_itemtools.cpp
===================================================================
--- scribus/ui/prefs_itemtools.cpp	(revision 14435)
+++ scribus/ui/prefs_itemtools.cpp	(revision 14436)
@@ -112,19 +112,6 @@
 	textColumnsSpinBox->setValue(prefsData->itemToolPrefs.textColumns);
 	textColumnGapSpinBox->setValue(prefsData->itemToolPrefs.textColumnGap * unitRatio);
 
-
-/*
-			polygonCornerCountSpinBox
-			polygonRotationSpinBox
-			applyFactorCheckBox
-			polygonFactorSpinBox
-			polygonFactorSlider
-			polygonCurvatureSpinBox
-			polygonCurvatureSlider
-			polygonPreviewWidet
-
-			*/
-
 	//Image Tool
 //TODO	imageFrameLineColorComboBox
 //TODO	imageFrameLineShadingSpinBox
@@ -158,23 +145,8 @@
 	shapeLineWidthSpinBox->setValue(prefsData->itemToolPrefs.shapeLineWidth);
 
 	//Polygon Tool
-//TODO	polygonCornerCountSpinBox
-//	polygonRotationSpinBox
-//	applyFactorCheckBox
-//	polygonFactorSpinBox
-//	polygonFactorSlider
-//	polygonCurvatureSpinBox
-//	polygonCurvatureSlider
-//
-//
-//	prefsData->polyCorners,
-//									   prefsData->polyFactorGuiVal,
-//									   prefsData->polyFactor,
-//									   prefsData->polyUseFactor,
-//									   prefsData->polyRotation,
-//									   prefsData->polyCurvature
+	polygonWidget->restoreDefaults(&prefsData->itemToolPrefs);
 
-
 	//Line Tool
 	lineFillColorComboBox->initColorList(colorList, m_doc, prefsData->itemToolPrefs.lineColor);
 
@@ -245,9 +217,6 @@
 			break;
 	}
 
-
-
-
 	//Image Tool
 //
 //	TODO imageFrameLineColorComboBox
@@ -288,14 +257,7 @@
 
 
 	//Polygon Tool
-//	polygonCornerCountSpinBox
-//	polygonRotationSpinBox
-//	applyFactorCheckBox
-//	polygonFactorSpinBox
-//	polygonFactorSlider
-//	polygonCurvatureSpinBox
-//	polygonCurvatureSlider
-//	polygonPreviewWidet
+	polygonWidget->saveGuiToPrefs(&prefsData->itemToolPrefs);
 
 	//Line Tool
 	prefsData->itemToolPrefs.lineColor = lineFillColorComboBox->currentText();
Index: scribus/ui/prefs_itemtoolsbase.ui
===================================================================
--- scribus/ui/prefs_itemtoolsbase.ui	(revision 14435)
+++ scribus/ui/prefs_itemtoolsbase.ui	(revision 14436)
@@ -44,7 +44,7 @@
       <enum>QTabWidget::Rounded</enum>
      </property>
      <property name="currentIndex">
-      <number>0</number>
+      <number>3</number>
      </property>
      <property name="elideMode">
       <enum>Qt::ElideRight</enum>
@@ -57,8 +57,29 @@
        <string>Text</string>
       </attribute>
       <layout class="QVBoxLayout" name="verticalLayout_3">
+       <property name="leftMargin">
+        <number>10</number>
+       </property>
+       <property name="topMargin">
+        <number>6</number>
+       </property>
+       <property name="rightMargin">
+        <number>10</number>
+       </property>
+       <property name="bottomMargin">
+        <number>6</number>
+       </property>
        <item>
         <widget class="QScrollArea" name="scrollArea">
+         <property name="frameShape">
+          <enum>QFrame::NoFrame</enum>
+         </property>
+         <property name="frameShadow">
+          <enum>QFrame::Raised</enum>
+         </property>
+         <property name="lineWidth">
+          <number>0</number>
+         </property>
          <property name="widgetResizable">
           <bool>true</bool>
          </property>
@@ -67,11 +88,14 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>582</width>
-            <height>693</height>
+            <width>432</width>
+            <height>672</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_2">
+           <property name="margin">
+            <number>6</number>
+           </property>
            <item>
             <layout class="QHBoxLayout" name="horizontalLayout_5">
              <item>
@@ -606,7 +630,7 @@
            </property>
            <property name="sizeHint" stdset="0">
             <size>
-             <width>40</width>
+             <width>20</width>
              <height>20</height>
             </size>
            </property>
@@ -961,7 +985,7 @@
            </property>
            <property name="sizeHint" stdset="0">
             <size>
-             <width>40</width>
+             <width>20</width>
              <height>20</height>
             </size>
            </property>
@@ -988,106 +1012,11 @@
       <attribute name="title">
        <string>Regular Polygons</string>
       </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout_7">
+      <layout class="QVBoxLayout" name="verticalLayout_6">
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout_7">
          <item>
-          <layout class="QVBoxLayout" name="verticalLayout_6">
-           <item>
-            <layout class="QFormLayout" name="formLayout_12">
-             <property name="formAlignment">
-              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-             </property>
-             <item row="0" column="0">
-              <widget class="QLabel" name="label_41">
-               <property name="text">
-                <string>Corners:</string>
-               </property>
-              </widget>
-             </item>
-             <item row="0" column="1">
-              <widget class="QSpinBox" name="polygonCornerCountSpinBox"/>
-             </item>
-             <item row="1" column="1">
-              <widget class="QSpinBox" name="polygonRotationSpinBox"/>
-             </item>
-             <item row="1" column="0">
-              <widget class="QLabel" name="label_42">
-               <property name="text">
-                <string>Rotation:</string>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </item>
-           <item>
-            <widget class="QCheckBox" name="applyFactorCheckBox">
-             <property name="text">
-              <string>Apply Factor</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <layout class="QFormLayout" name="formLayout_13">
-             <property name="formAlignment">
-              <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
-             </property>
-             <item row="0" column="0">
-              <widget class="QLabel" name="label_43">
-               <property name="text">
-                <string>Factor:</string>
-               </property>
-              </widget>
-             </item>
-             <item row="0" column="1">
-              <widget class="QSpinBox" name="polygonFactorSpinBox"/>
-             </item>
-             <item row="2" column="0">
-              <widget class="QLabel" name="label_44">
-               <property name="text">
-                <string>Curvature:</string>
-               </property>
-              </widget>
-             </item>
-             <item row="2" column="1">
-              <widget class="QSpinBox" name="polygonCurvatureSpinBox"/>
-             </item>
-             <item row="3" column="0" colspan="2">
-              <widget class="QSlider" name="polygonCurvatureSlider">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-              </widget>
-             </item>
-             <item row="1" column="0" colspan="2">
-              <widget class="QSlider" name="polygonFactorSlider">
-               <property name="orientation">
-                <enum>Qt::Horizontal</enum>
-               </property>
-              </widget>
-             </item>
-            </layout>
-           </item>
-          </layout>
-         </item>
-         <item>
-          <spacer name="horizontalSpacer_13">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType">
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>20</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QWidget" name="polygonPreviewWidet" native="true">
+          <widget class="PolygonWidget" name="polygonWidget" native="true">
            <property name="minimumSize">
             <size>
              <width>100</width>
@@ -1103,7 +1032,7 @@
            </property>
            <property name="sizeHint" stdset="0">
             <size>
-             <width>40</width>
+             <width>20</width>
              <height>20</height>
             </size>
            </property>
@@ -1119,7 +1048,7 @@
          <property name="sizeHint" stdset="0">
           <size>
            <width>20</width>
-           <height>371</height>
+           <height>20</height>
           </size>
          </property>
         </spacer>
@@ -1262,6 +1191,11 @@
  </widget>
  <customwidgets>
   <customwidget>
+   <class>ScrSpinBox</class>
+   <extends>QSpinBox</extends>
+   <header location="global">ui/scrspinbox.h</header>
+  </customwidget>
+  <customwidget>
    <class>FontCombo</class>
    <extends>QComboBox</extends>
    <header>ui/fontcombo.h</header>
@@ -1282,9 +1216,10 @@
    <header>ui/linecombo.h</header>
   </customwidget>
   <customwidget>
-   <class>ScrSpinBox</class>
-   <extends>QSpinBox</extends>
-   <header location="global">ui/scrspinbox.h</header>
+   <class>PolygonWidget</class>
+   <extends>QWidget</extends>
+   <header>ui/polygonwidget.h</header>
+   <container>1</container>
   </customwidget>
  </customwidgets>
  <resources/>
Index: scribus/ui/prefs_guidesbase.ui
===================================================================
--- scribus/ui/prefs_guidesbase.ui	(revision 14435)
+++ scribus/ui/prefs_guidesbase.ui	(revision 14436)
@@ -46,79 +46,72 @@
         <x>0</x>
         <y>0</y>
         <width>724</width>
-        <height>757</height>
+        <height>754</height>
        </rect>
       </property>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
+      <layout class="QVBoxLayout" name="verticalLayout">
        <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_3">
-         <item>
-          <layout class="QFormLayout" name="formLayout">
-           <item row="0" column="0">
-            <widget class="QLabel" name="label_2">
-             <property name="text">
-              <string>Placement:</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="1">
-            <widget class="QComboBox" name="guidePlacementComboBox"/>
-           </item>
-           <item row="1" column="0">
-            <widget class="QLabel" name="label_4">
-             <property name="text">
-              <string>Snap Distance:</string>
-             </property>
-            </widget>
-           </item>
-           <item row="1" column="1">
-            <widget class="ScrSpinBox" name="guideSnapDistanceSpinBox">
-             <property name="suffix">
-              <string> px</string>
-             </property>
-             <property name="minimum">
-              <number>1</number>
-             </property>
-             <property name="maximum">
-              <number>1000</number>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="0">
-            <widget class="QLabel" name="label_3">
-             <property name="text">
-              <string>Grab Radius:</string>
-             </property>
-            </widget>
-           </item>
-           <item row="2" column="1">
-            <widget class="ScrSpinBox" name="guideGrabRadiusSpinBox">
-             <property name="suffix">
-              <string> px</string>
-             </property>
-             <property name="minimum">
-              <number>1</number>
-             </property>
-             <property name="maximum">
-              <number>1000</number>
-             </property>
-            </widget>
-           </item>
-          </layout>
+        <layout class="QFormLayout" name="formLayout">
+         <property name="formAlignment">
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+         </property>
+         <item row="0" column="0">
+          <widget class="QLabel" name="label_2">
+           <property name="text">
+            <string>Placement:</string>
+           </property>
+          </widget>
          </item>
-         <item>
-          <spacer name="horizontalSpacer_2">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
+         <item row="0" column="1">
+          <widget class="QComboBox" name="guidePlacementComboBox">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
            </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>642</width>
-             <height>20</height>
-            </size>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <widget class="QLabel" name="label_4">
+           <property name="text">
+            <string>Snap Distance:</string>
            </property>
-          </spacer>
+          </widget>
          </item>
+         <item row="1" column="1">
+          <widget class="ScrSpinBox" name="guideSnapDistanceSpinBox">
+           <property name="suffix">
+            <string> px</string>
+           </property>
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>1000</number>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QLabel" name="label_3">
+           <property name="text">
+            <string>Grab Radius:</string>
+           </property>
+          </widget>
+         </item>
+         <item row="2" column="1">
+          <widget class="ScrSpinBox" name="guideGrabRadiusSpinBox">
+           <property name="suffix">
+            <string> px</string>
+           </property>
+           <property name="minimum">
+            <number>1</number>
+           </property>
+           <property name="maximum">
+            <number>1000</number>
+           </property>
+          </widget>
+         </item>
         </layout>
        </item>
        <item>
@@ -158,52 +151,41 @@
         </widget>
        </item>
        <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_2">
-         <item>
-          <layout class="QVBoxLayout" name="verticalLayout">
-           <item>
-            <widget class="QCheckBox" name="visibilityGuidesCheckBox">
-             <property name="text">
-              <string>Guides</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QCheckBox" name="visibilityMarginsCheckBox">
-             <property name="text">
-              <string>Margins</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QCheckBox" name="visibilityGridCheckBox">
-             <property name="text">
-              <string>Page Grid</string>
-             </property>
-            </widget>
-           </item>
-           <item>
-            <widget class="QCheckBox" name="visibilityBaselineGridCheckBox">
-             <property name="text">
-              <string>Baseline Grid</string>
-             </property>
-            </widget>
-           </item>
-          </layout>
+        <layout class="QFormLayout" name="formLayout_4">
+         <property name="labelAlignment">
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+         </property>
+         <property name="formAlignment">
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+         </property>
+         <item row="0" column="0">
+          <widget class="QCheckBox" name="visibilityGuidesCheckBox">
+           <property name="text">
+            <string>Guides</string>
+           </property>
+          </widget>
          </item>
-         <item>
-          <spacer name="horizontalSpacer">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
+         <item row="1" column="0">
+          <widget class="QCheckBox" name="visibilityMarginsCheckBox">
+           <property name="text">
+            <string>Margins</string>
            </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>642</width>
-             <height>20</height>
-            </size>
+          </widget>
+         </item>
+         <item row="2" column="0">
+          <widget class="QCheckBox" name="visibilityGridCheckBox">
+           <property name="text">
+            <string>Page Grid</string>
            </property>
-          </spacer>
+          </widget>
          </item>
+         <item row="3" column="0">
+          <widget class="QCheckBox" name="visibilityBaselineGridCheckBox">
+           <property name="text">
+            <string>Baseline Grid</string>
+           </property>
+          </widget>
+         </item>
         </layout>
        </item>
        <item>
@@ -458,10 +440,10 @@
       <zorder>verticalSpacer_3</zorder>
       <zorder>verticalSpacer_4</zorder>
       <zorder>line_4</zorder>
-      <zorder></zorder>
-      <zorder></zorder>
       <zorder>label_7</zorder>
       <zorder>label_6</zorder>
+      <zorder></zorder>
+      <zorder></zorder>
      </widget>
     </widget>
    </item>
Index: scribus/ui/cmsprefsbase.ui
===================================================================
--- scribus/ui/cmsprefsbase.ui	(revision 14435)
+++ scribus/ui/cmsprefsbase.ui	(revision 14436)
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>308</width>
+    <width>348</width>
     <height>467</height>
    </rect>
   </property>
@@ -173,7 +173,7 @@
       <bool>false</bool>
      </property>
      <property name="title">
-      <string>Docuemnt Rendering Intents</string>
+      <string>Document Rendering Intents</string>
      </property>
      <layout class="QGridLayout">
       <property name="margin">




More information about the scribus-commit mailing list