View Issue Details

IDProjectCategoryView StatusLast Update
0013941ScribusUser Interfacepublic2016-04-10 21:59
ReporterFirasH Assigned ToFirasH  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.5.2.svn 
Target VersionFixed in Version1.5.2.svn 
Summary0013941: Various naming fixes to polygonWidget
DescriptionVarious naming fixes to polygonWidget.
Only change not related to naming is the new size (0 x 0) of the verticalSpacer under Polygon Preview widget. This allows horizontal resize to be simmetrical (removes horizontal space when preview is not activated).
Additional Information1.5.2.svn (21184)
TagsNo tags attached.
PatchYes

Relationships

child of 0013906 acknowledged Metabug: UI enhancement proposals (1.5.x.svn) 

Activities

FirasH

2016-04-10 13:26

developer  

13941-Patch.diff (14,730 bytes)

diff --git a/scribus/ui/polygonwidget.cpp b/scribus/ui/polygonwidget.cpp
--- a/scribus/ui/polygonwidget.cpp
+++ b/scribus/ui/polygonwidget.cpp
@@ -30,9 +30,9 @@
 	cornersSpinBox->setDecimals(0);
 	cornersSpinBox->setDecimals(0);
 	curvatureSpinBox->setDecimals(0);
-	innerRotationspinBox->setNewUnit(6);
-	innerRotationspinBox->setDecimals(0);
-	OuterCurvatureSpinBox->setDecimals(0);
+	innerRotationSpinBox->setNewUnit(6);
+	innerRotationSpinBox->setDecimals(0);
+	outerCurvatureSpinBox->setDecimals(0);
 	editMode = false;
 }
 
@@ -45,9 +45,9 @@
 	cornersSpinBox->setDecimals(0);
 	cornersSpinBox->setDecimals(0);
 	curvatureSpinBox->setDecimals(0);
-	innerRotationspinBox->setNewUnit(6);
-	innerRotationspinBox->setDecimals(0);
-	OuterCurvatureSpinBox->setDecimals(0);
+	innerRotationSpinBox->setNewUnit(6);
+	innerRotationSpinBox->setDecimals(0);
+	outerCurvatureSpinBox->setDecimals(0);
 	editMode = forEditMode;
 	if (editMode)
 		Preview->hide();
@@ -72,12 +72,12 @@
 		connect(curvatureSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setCurvatureSlider(double)));
 		connect(curvatureSlider, SIGNAL(valueChanged(int)), curvatureSpinBox, SLOT(setValue(int)));
 		connect(curvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
-		connect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationspinBox, SLOT(setValue(int)));
+		connect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationSpinBox, SLOT(setValue(int)));
 		connect(innerRotationSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
-		connect(innerRotationspinBox, SIGNAL(valueChanged(double)), this, SLOT(setInnerRotationSlider(double)));
-		connect(OuterCurvatureSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setOuterCurvatureSlider(double)));
-		connect(OuterCurvatureSlider, SIGNAL(valueChanged(int)), OuterCurvatureSpinBox, SLOT(setValue(int)));
-		connect(OuterCurvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		connect(innerRotationSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setInnerRotationSlider(double)));
+		connect(outerCurvatureSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setOuterCurvatureSlider(double)));
+		connect(outerCurvatureSlider, SIGNAL(valueChanged(int)), outerCurvatureSpinBox, SLOT(setValue(int)));
+		connect(outerCurvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
 	}
 	else
 	{
@@ -92,12 +92,12 @@
 		disconnect(curvatureSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setCurvatureSlider(double)));
 		disconnect(curvatureSlider, SIGNAL(valueChanged(int)), curvatureSpinBox, SLOT(setValue(int)));
 		disconnect(curvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
-		disconnect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationspinBox, SLOT(setValue(int)));
+		disconnect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationSpinBox, SLOT(setValue(int)));
 		disconnect(innerRotationSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
-		disconnect(innerRotationspinBox, SIGNAL(valueChanged(double)), this, SLOT(setInnerRotationSlider(double)));
-		disconnect(OuterCurvatureSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setOuterCurvatureSlider(double)));
-		disconnect(OuterCurvatureSlider, SIGNAL(valueChanged(int)), OuterCurvatureSpinBox, SLOT(setValue(int)));
-		disconnect(OuterCurvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
+		disconnect(innerRotationSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setInnerRotationSlider(double)));
+		disconnect(outerCurvatureSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setOuterCurvatureSlider(double)));
+		disconnect(outerCurvatureSlider, SIGNAL(valueChanged(int)), outerCurvatureSpinBox, SLOT(setValue(int)));
+		disconnect(outerCurvatureSlider, SIGNAL(valueChanged(int)), this, SLOT(updatePreview()));
 	}
 }
 
@@ -116,9 +116,9 @@
 	applyConvexGroupBox->setChecked(prefsData->polyUseFactor);
 	curvatureSpinBox->setValue(qRound(prefsData->polyCurvature * 100));
 	curvatureSlider->setValue(qRound(prefsData->polyCurvature * 100));
-	OuterCurvatureSpinBox->setValue(qRound(prefsData->polyOuterCurvature * 100));
-	OuterCurvatureSlider->setValue(qRound(prefsData->polyOuterCurvature * 100));
-	innerRotationspinBox->setValue(static_cast<int>(prefsData->polyInnerRot));
+	outerCurvatureSpinBox->setValue(qRound(prefsData->polyOuterCurvature * 100));
+	outerCurvatureSlider->setValue(qRound(prefsData->polyOuterCurvature * 100));
+	innerRotationSpinBox->setValue(static_cast<int>(prefsData->polyInnerRot));
 	innerRotationSlider->setValue(static_cast<int>(prefsData->polyInnerRot));
 	updatePreview();
 	connectSignals(true);
@@ -130,9 +130,9 @@
 	prefsData->polyFactor = PFactor;
 	prefsData->polyUseFactor = applyConvexGroupBox->isChecked();
 	prefsData->polyRotation = rotationSpinBox->value();
-	prefsData->polyInnerRot = innerRotationspinBox->value();
+	prefsData->polyInnerRot = innerRotationSpinBox->value();
 	prefsData->polyCurvature = curvatureSpinBox->value() / 100.0;
-	prefsData->polyOuterCurvature = OuterCurvatureSpinBox->value() / 100.0;
+	prefsData->polyOuterCurvature = outerCurvatureSpinBox->value() / 100.0;
 }
 
 void PolygonWidget::setValues(int polyCorners, double polyF, bool polyUseConvexFactor, double polyRotation, double polyCurvature, double polyInnerRot, double polyOuterCurvature)
@@ -142,7 +142,7 @@
 	int fGui = qRound(getUserValFromFactor(polyF));
 	rotationSpinBox->setValue(static_cast<int>(polyRotation));
 	rotationSlider->setValue(static_cast<int>(polyRotation));
-	innerRotationspinBox->setValue(static_cast<int>(polyInnerRot));
+	innerRotationSpinBox->setValue(static_cast<int>(polyInnerRot));
 	innerRotationSlider->setValue(static_cast<int>(polyInnerRot));
 	applyConvexGroupBox->setChecked(polyUseConvexFactor);
 	factorSpinBox->setValue(fGui);
@@ -150,8 +150,8 @@
 	applyConvexGroupBox->setChecked(polyUseConvexFactor);
 	curvatureSpinBox->setValue(qRound(polyCurvature * 100));
 	curvatureSlider->setValue(qRound(polyCurvature * 100));
-	OuterCurvatureSpinBox->setValue(qRound(polyOuterCurvature * 100));
-	OuterCurvatureSlider->setValue(qRound(polyOuterCurvature * 100));
+	outerCurvatureSpinBox->setValue(qRound(polyOuterCurvature * 100));
+	outerCurvatureSlider->setValue(qRound(polyOuterCurvature * 100));
 }
 
 void PolygonWidget::getValues(int* polyCorners, double* polyF, bool* polyUseConvexFactor, double* polyRotation, double* polyCurvature, double* polyInnerRot, double* polyOuterCurvature)
@@ -160,9 +160,9 @@
 	*polyF = PFactor;
 	*polyUseConvexFactor = applyConvexGroupBox->isChecked();
 	*polyRotation = rotationSpinBox->value();
-	*polyInnerRot = innerRotationspinBox->value();
+	*polyInnerRot = innerRotationSpinBox->value();
 	*polyCurvature = curvatureSpinBox->value() / 100.0;
-	*polyOuterCurvature = OuterCurvatureSpinBox->value() / 100.0;
+	*polyOuterCurvature = outerCurvatureSpinBox->value() / 100.0;
 }
 
 void PolygonWidget::setFactorSlider(double a)
@@ -181,9 +181,9 @@
 
 void PolygonWidget::setInnerRotationSlider(double a)
 {
-	disconnect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationspinBox, SLOT(setValue(int)));
+	disconnect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationSpinBox, SLOT(setValue(int)));
 	innerRotationSlider->setValue(static_cast<int>(a));
-	connect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationspinBox, SLOT(setValue(int)));
+	connect(innerRotationSlider, SIGNAL(valueChanged(int)), innerRotationSpinBox, SLOT(setValue(int)));
 }
 
 void PolygonWidget::setCurvatureSlider(double a)
@@ -195,9 +195,9 @@
 
 void PolygonWidget::setOuterCurvatureSlider(double a)
 {
-	disconnect(OuterCurvatureSlider, SIGNAL(valueChanged(int)), OuterCurvatureSpinBox, SLOT(setValue(int)));
-	OuterCurvatureSlider->setValue(static_cast<int>(a));
-	connect(OuterCurvatureSlider, SIGNAL(valueChanged(int)), OuterCurvatureSpinBox, SLOT(setValue(int)));
+	disconnect(outerCurvatureSlider, SIGNAL(valueChanged(int)), outerCurvatureSpinBox, SLOT(setValue(int)));
+	outerCurvatureSlider->setValue(static_cast<int>(a));
+	connect(outerCurvatureSlider, SIGNAL(valueChanged(int)), outerCurvatureSpinBox, SLOT(setValue(int)));
 }
 
 void PolygonWidget::updatePreview()
@@ -204,11 +204,11 @@
 {
 	if (editMode)
 	{
-		emit NewVectors(cornersSpinBox->value(), GetFactor(), applyConvexGroupBox->isChecked(), rotationSpinBox->value(), curvatureSpinBox->value() / 100.0, innerRotationspinBox->value(), OuterCurvatureSpinBox->value() / 100.0);
+		emit NewVectors(cornersSpinBox->value(), GetFactor(), applyConvexGroupBox->isChecked(), rotationSpinBox->value(), curvatureSpinBox->value() / 100.0, innerRotationSpinBox->value(), outerCurvatureSpinBox->value() / 100.0);
 		return;
 	}
 	double roundness = curvatureSpinBox->value() / 100.0;
-	double innerround = OuterCurvatureSpinBox->value() / 100.0;
+	double innerround = outerCurvatureSpinBox->value() / 100.0;
 	QPixmap pm = QPixmap(Preview->width() - 5, Preview->height() - 5);
 	pm.fill(Qt::white);
 	QPainter p;
@@ -215,7 +215,7 @@
 	p.begin(&pm);
 	p.setBrush(Qt::NoBrush);
 	p.setPen(Qt::black);
-	QPainterPath pp = RegularPolygonPath(Preview->width() - 6, Preview->height() - 6, cornersSpinBox->value(), applyConvexGroupBox->isChecked(), GetFactor(), rotationSlider->value(), roundness, innerRotationspinBox->value(), innerround);
+	QPainterPath pp = RegularPolygonPath(Preview->width() - 6, Preview->height() - 6, cornersSpinBox->value(), applyConvexGroupBox->isChecked(), GetFactor(), rotationSlider->value(), roundness, innerRotationSpinBox->value(), innerround);
 	QRectF br = pp.boundingRect();
 	if (br.x() < 0)
 	{
diff --git a/scribus/ui/polygonwidgetbase.ui b/scribus/ui/polygonwidgetbase.ui
--- a/scribus/ui/polygonwidgetbase.ui
+++ b/scribus/ui/polygonwidgetbase.ui
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>558</width>
-    <height>560</height>
+    <width>495</width>
+    <height>359</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -17,13 +17,13 @@
    </sizepolicy>
   </property>
   <property name="windowTitle">
-   <string notr="true">Form</string>
+   <string notr="true"/>
   </property>
   <layout class="QGridLayout" name="gridLayout_3">
    <item row="0" column="0">
     <layout class="QGridLayout" name="gridLayout">
      <item row="0" column="0">
-      <widget class="QLabel" name="label">
+      <widget class="QLabel" name="cornersSpinBoxLabel">
        <property name="text">
         <string>Corn&amp;ers:</string>
        </property>
@@ -49,7 +49,7 @@
       </widget>
      </item>
      <item row="1" column="0">
-      <widget class="QLabel" name="label_2">
+      <widget class="QLabel" name="rotationSpinBoxLabel">
        <property name="text">
         <string>&amp;Rotation:</string>
        </property>
@@ -147,8 +147,8 @@
        </property>
        <property name="sizeHint" stdset="0">
         <size>
-         <width>20</width>
-         <height>40</height>
+         <width>0</width>
+         <height>0</height>
         </size>
        </property>
       </spacer>
@@ -168,7 +168,7 @@
      </property>
      <layout class="QGridLayout" name="gridLayout_2">
       <item row="0" column="0">
-       <widget class="QLabel" name="label_3">
+       <widget class="QLabel" name="factorSpinBoxLabel">
         <property name="text">
          <string>&amp;Factor:</string>
         </property>
@@ -213,7 +213,7 @@
        </widget>
       </item>
       <item row="2" column="0">
-       <widget class="QLabel" name="label_4">
+       <widget class="QLabel" name="innerRotationSpinBoxLabel">
         <property name="text">
          <string>Inner Rotation:</string>
         </property>
@@ -220,7 +220,7 @@
        </widget>
       </item>
       <item row="2" column="1">
-       <widget class="ScrSpinBox" name="innerRotationspinBox">
+       <widget class="ScrSpinBox" name="innerRotationSpinBox">
         <property name="minimum">
          <number>-180</number>
         </property>
@@ -246,7 +246,7 @@
        </widget>
       </item>
       <item row="4" column="0">
-       <widget class="QLabel" name="label_5">
+       <widget class="QLabel" name="curvatureSpinBoxLabel">
         <property name="text">
          <string>Inner C&amp;urvature:</string>
         </property>
@@ -279,7 +279,7 @@
        </widget>
       </item>
       <item row="6" column="0">
-       <widget class="QLabel" name="label_6">
+       <widget class="QLabel" name="outerCurvatureSpinBoxLabel">
         <property name="text">
          <string>Outer Curvature:</string>
         </property>
@@ -286,7 +286,7 @@
        </widget>
       </item>
       <item row="6" column="1">
-       <widget class="ScrSpinBox" name="OuterCurvatureSpinBox">
+       <widget class="ScrSpinBox" name="outerCurvatureSpinBox">
         <property name="suffix">
          <string> %</string>
         </property>
@@ -296,7 +296,7 @@
        </widget>
       </item>
       <item row="7" column="0" colspan="2">
-       <widget class="QSlider" name="OuterCurvatureSlider">
+       <widget class="QSlider" name="outerCurvatureSlider">
         <property name="maximum">
          <number>100</number>
         </property>
@@ -309,18 +309,18 @@
        </widget>
       </item>
      </layout>
-     <zorder>label_3</zorder>
+     <zorder>factorSpinBoxLabel</zorder>
      <zorder>factorSpinBox</zorder>
      <zorder>factorSlider</zorder>
-     <zorder>label_5</zorder>
+     <zorder>curvatureSpinBoxLabel</zorder>
      <zorder>curvatureSpinBox</zorder>
      <zorder>curvatureSlider</zorder>
-     <zorder>label_6</zorder>
-     <zorder>OuterCurvatureSpinBox</zorder>
-     <zorder>OuterCurvatureSlider</zorder>
+     <zorder>outerCurvatureSpinBoxLabel</zorder>
+     <zorder>outerCurvatureSpinBox</zorder>
+     <zorder>outerCurvatureSlider</zorder>
      <zorder>innerRotationSlider</zorder>
-     <zorder>innerRotationspinBox</zorder>
-     <zorder>label_4</zorder>
+     <zorder>innerRotationSpinBox</zorder>
+     <zorder>innerRotationSpinBoxLabel</zorder>
     </widget>
    </item>
   </layout>
@@ -332,6 +332,20 @@
    <header location="global">ui/scrspinbox.h</header>
   </customwidget>
  </customwidgets>
+ <tabstops>
+  <tabstop>cornersSpinBox</tabstop>
+  <tabstop>rotationSpinBox</tabstop>
+  <tabstop>rotationSlider</tabstop>
+  <tabstop>applyConvexGroupBox</tabstop>
+  <tabstop>factorSpinBox</tabstop>
+  <tabstop>factorSlider</tabstop>
+  <tabstop>innerRotationSpinBox</tabstop>
+  <tabstop>innerRotationSlider</tabstop>
+  <tabstop>curvatureSpinBox</tabstop>
+  <tabstop>curvatureSlider</tabstop>
+  <tabstop>outerCurvatureSpinBox</tabstop>
+  <tabstop>outerCurvatureSlider</tabstop>
+ </tabstops>
  <resources/>
  <connections/>
 </ui>
13941-Patch.diff (14,730 bytes)

FirasH

2016-04-10 13:41

developer  

13941-Screen.png (44,246 bytes)
13941-Screen.png (44,246 bytes)

jghali

2016-04-10 19:39

administrator   ~0040027

Committed, thanks!

FirasH

2016-04-10 21:59

developer   ~0040030

Thanks jghali!
Fixed in 1.5.2.svn (21186).

Issue History

Date Modified Username Field Change
2016-04-10 13:25 FirasH New Issue
2016-04-10 13:26 FirasH File Added: 13941-Patch.diff
2016-04-10 13:41 FirasH File Added: 13941-Screen.png
2016-04-10 13:45 FirasH Relationship added child of 0013906
2016-04-10 19:39 jghali Note Added: 0040027
2016-04-10 19:39 jghali Status new => resolved
2016-04-10 19:39 jghali Resolution open => fixed
2016-04-10 19:39 jghali Assigned To => FirasH
2016-04-10 21:59 FirasH Note Added: 0040030
2016-04-10 21:59 FirasH Status resolved => closed
2016-04-10 21:59 FirasH Fixed in Version => 1.5.2.svn