r23715 by jghali - #15984: Hatch angles restricted
scribus-commit
scribus-commit at lists.scribus.net
Fri May 8 21:52:10 UTC 2020
Author: jghali
Date: Fri May 8 21:52:10 2020
New Revision: 23715
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23715
Log:
#15984: Hatch angles restricted
Modified:
trunk/Scribus/scribus/ui/colorpalette.ui
trunk/Scribus/scribus/ui/cpalette.cpp
trunk/Scribus/scribus/ui/scrspinbox.cpp
Modified: trunk/Scribus/scribus/ui/colorpalette.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23715&path=/trunk/Scribus/scribus/ui/colorpalette.ui
==============================================================================
--- trunk/Scribus/scribus/ui/colorpalette.ui (original)
+++ trunk/Scribus/scribus/ui/colorpalette.ui Fri May 8 21:52:10 2020
@@ -629,7 +629,14 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="ScrSpinBox" name="hatchAngle"/>
+ <widget class="ScrSpinBox" name="hatchAngle">
+ <property name="minimum">
+ <double>-360.000000000000000</double>
+ </property>
+ <property name="maximum">
+ <double>360.000000000000000</double>
+ </property>
+ </widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="hatchTypeLabel">
Modified: trunk/Scribus/scribus/ui/cpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23715&path=/trunk/Scribus/scribus/ui/cpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/cpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/cpalette.cpp Fri May 8 21:52:10 2020
@@ -115,6 +115,7 @@
setCurrentItem(nullptr);
hatchAngle->setDecimals(0);
hatchAngle->setNewUnit(6);
+ hatchAngle->setValues(-360, 360, 1, 0);
hatchDist->setDecimals(0);
hatchDist->setNewUnit(0);
hatchDist->setValues(1, 1000, 0, 1);
Modified: trunk/Scribus/scribus/ui/scrspinbox.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23715&path=/trunk/Scribus/scribus/ui/scrspinbox.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scrspinbox.cpp (original)
+++ trunk/Scribus/scribus/ui/scrspinbox.cpp Fri May 8 21:52:10 2020
@@ -102,7 +102,7 @@
void ScrSpinBox::setNewUnit(int unitIndex)
{
- double oldUnitRatio=unitGetRatioFromIndex(m_unitIndex);
+ double oldUnitRatio = unitGetRatioFromIndex(m_unitIndex);
double oldVal = value() / oldUnitRatio;
double oldMax = maximum() / oldUnitRatio;
double oldMin = minimum() / oldUnitRatio;
@@ -112,7 +112,7 @@
setMinimum(oldMin * newUnitRatio);
setMaximum(oldMax * newUnitRatio);
setSingleStep(1.0);
- m_unitIndex=unitIndex;
+ m_unitIndex = unitIndex;
setValue(oldVal * newUnitRatio);
}
More information about the scribus-commit
mailing list