r14388 by cbradney - Most widgets now working on the item tools dialog

scribus-commit scribus-commit at lists.scribus.net
Wed Dec 9 00:40:19 CET 2009


Revision: 14388
Author: cbradney
Date: 2009-12-08T13:00:20.866859Z
Commit message: Most widgets now working on the item tools dialog

Changeset: 
M  /trunk/Scribus/scribus/ui/prefs_itemtools.cpp
M  /trunk/Scribus/scribus/ui/prefs_itemtoolsbase.ui

Diffs:
Index: scribus/ui/prefs_itemtools.cpp
===================================================================
--- scribus/ui/prefs_itemtools.cpp	(revision 14387)
+++ scribus/ui/prefs_itemtools.cpp	(revision 14388)
@@ -11,8 +11,6 @@
 #include "scrspinbox.h"
 #include "scribusdoc.h"
 #include "units.h"
-//#include "colorcombo.h"
-//#include "colorlistbox.h"
 #include "commonstrings.h"
 #include "prefsmanager.h"
 
@@ -30,8 +28,9 @@
 	lineWidthSpinBox->setDecimals(1);
 	shapeLineWidthSpinBox->setSpecialValueText( tr("Hairline"));
 	lineWidthSpinBox->setSpecialValueText( tr("Hairline"));
-
-
+	textSizeSpinBox->setNewUnit(0);
+	textSizeSpinBox->setMinimum(0.5);
+	textSizeSpinBox->setMaximum(2048);
 	languageChange();
 }
 
@@ -46,54 +45,125 @@
 
 void Prefs_ItemTools::unitChange(int newIndex)
 {
-
+	textColumnGapSpinBox->setNewUnit(newIndex);
+	textTabWidthSpinBox->setNewUnit(newIndex);
 }
 
 void Prefs_ItemTools::restoreDefaults(struct ApplicationPrefs *prefsData)
 {
 	enableSignals(false);
 	int docUnitIndex = prefsData->docSetupPrefs.docUnitIndex;
+	double unitRatio = unitGetRatioFromIndex(docUnitIndex);
 	unitChange(docUnitIndex);
 
 	PrefsManager* prefsManager=PrefsManager::instance();
 	ColorList::Iterator itc, endOfColorList;
-	//ColorList* colorList = (docu != 0) ? (&docu->PageColors) : prefsManager->colorSetPtr();
+	//TODO ColorList* colorList = (docu != 0) ? (&docu->PageColors) : prefsManager->colorSetPtr();
 	ColorList* colorList = prefsManager->colorSetPtr();
 
 
-	/*
-	textFrameFillColorComboBox
-			textFrameLineColorComboBox
-			textFrameFillShadingSpinBox
-			textFrameLineShadingSpinBox
-			textColumnsSpinBox
-			textColumnGapSpinBox
-			textTabFillCharComboBox
-			textTabWidthSpinBox
-			textFontComboBox
-			textSizeSpinBox
-			textColorComboBox
-			textStrokeColorComboBox
-			textColorShadingSpinBox
-			textStrokeShadingSpinBox
-			textPreviewWidget
+	//Text Tool
 
-			imageFrameFillColorComboBox
-			imageFrameLineColorComboBox
-			imageFrameFillShadingSpinBox
-			imageFrameLineShadingSpinBox
-			imageUseEmbeddedClippingPathCheckBox
-			imageFreeScalingRadioButton
-			imageFrameScalingRadioButton
-			imageHorizontalScalingSpinBox
-			imageVerticalScalingSpinBox
-			scalingLockToolButton
-			imageKeepAspectRatioCheckBox
-			onscreenResolutionFullRadioButton
-			onscreenResolutionNormalRadioButton
-			onscreenResolutionLowRadioButton
+//TODO	textPreviewWidget
 
-*/
+	for (int fc=0; fc<textFontComboBox->count(); ++fc)
+	{
+		if (textFontComboBox->itemText(fc) == prefsData->itemToolPrefs.textFont)
+		{
+			textFontComboBox->setCurrentIndex(fc);
+			break;
+		}
+	}
+
+	textSizeSpinBox->setValue(prefsData->itemToolPrefs.textSize / 10);
+
+	textColorComboBox->clear();
+	textColorComboBox->addItem(CommonStrings::tr_NoneColor);
+	if (prefsData->itemToolPrefs.textColor == CommonStrings::None)
+		textColorComboBox->setCurrentIndex(textColorComboBox->count()-1);
+	endOfColorList=colorList->end();
+	for (itc = colorList->begin(); itc != endOfColorList; ++itc)
+	{
+		textColorComboBox->insertFancyItem( itc.value(), m_doc, itc.key() );
+		if (itc.key() == prefsData->itemToolPrefs.textColor)
+			textColorComboBox->setCurrentIndex(textColorComboBox->count()-1);
+	}
+
+	textColorShadingSpinBox->setValue(prefsData->itemToolPrefs.textShade);
+
+	textStrokeColorComboBox->clear();
+	textStrokeColorComboBox->addItem(CommonStrings::tr_NoneColor);
+	if (prefsData->itemToolPrefs.textStrokeColor == CommonStrings::None)
+		textStrokeColorComboBox->setCurrentIndex(textStrokeColorComboBox->count()-1);
+	endOfColorList=colorList->end();
+	for (itc = colorList->begin(); itc != endOfColorList; ++itc)
+	{
+		textStrokeColorComboBox->insertFancyItem( itc.value(), m_doc, itc.key() );
+		if (itc.key() == prefsData->itemToolPrefs.textStrokeColor)
+			textStrokeColorComboBox->setCurrentIndex(textStrokeColorComboBox->count()-1);
+	}
+	textStrokeShadingSpinBox->setValue(prefsData->itemToolPrefs.textStrokeShade);
+
+	textFrameFillColorComboBox->clear();
+	textFrameFillColorComboBox->addItem(CommonStrings::tr_NoneColor);
+	if (prefsData->itemToolPrefs.textFillColor == CommonStrings::None)
+		textFrameFillColorComboBox->setCurrentIndex(textFrameFillColorComboBox->count()-1);
+	endOfColorList=colorList->end();
+	for (itc = colorList->begin(); itc != endOfColorList; ++itc)
+	{
+		textFrameFillColorComboBox->insertFancyItem( itc.value(), m_doc, itc.key() );
+		if (itc.key() == prefsData->itemToolPrefs.textFillColor)
+			textFrameFillColorComboBox->setCurrentIndex(textFrameFillColorComboBox->count()-1);
+	}
+	textFrameFillShadingSpinBox->setValue(prefsData->itemToolPrefs.textFillColorShade);
+
+	textFrameLineColorComboBox->clear();
+	textFrameLineColorComboBox->addItem(CommonStrings::tr_NoneColor);
+	if (prefsData->itemToolPrefs.textLineColor == CommonStrings::None)
+		textFrameLineColorComboBox->setCurrentIndex(textFrameLineColorComboBox->count()-1);
+	endOfColorList=colorList->end();
+	for (itc = colorList->begin(); itc != endOfColorList; ++itc)
+	{
+		textFrameLineColorComboBox->insertFancyItem( itc.value(), m_doc, itc.key() );
+		if (itc.key() == prefsData->itemToolPrefs.textLineColor)
+			textFrameLineColorComboBox->setCurrentIndex(textFrameLineColorComboBox->count()-1);
+	}
+	textFrameLineShadingSpinBox->setValue(prefsData->itemToolPrefs.textLineColorShade);
+
+	textTabFillCharComboBox->clear();
+	textTabFillCharComboBox->addItem( tr("None", "tab fill" ));
+	textTabFillCharComboBox->addItem( tr("Dot"));
+	textTabFillCharComboBox->addItem( tr("Hyphen"));
+	textTabFillCharComboBox->addItem( tr("Underscore"));
+	textTabFillCharComboBox->addItem( tr("Custom"));
+	if (prefsData->itemToolPrefs.textTabFillChar.isEmpty())
+	{
+		textTabFillCharComboBox->setCurrentIndex(0);
+	}
+	else if (prefsData->itemToolPrefs.textTabFillChar == ".")
+	{
+		textTabFillCharComboBox->setCurrentIndex(1);
+	}
+	else if (prefsData->itemToolPrefs.textTabFillChar == "-")
+	{
+		textTabFillCharComboBox->setCurrentIndex(2);
+	}
+	else if (prefsData->itemToolPrefs.textTabFillChar == "_")
+	{
+		textTabFillCharComboBox->setCurrentIndex(3);
+	}
+	else
+	{
+		textTabFillCharComboBox->setCurrentIndex(4);
+		textTabFillCharComboBox->setEditable(true);
+		textTabFillCharComboBox->setItemText(textTabFillCharComboBox->currentIndex(), CommonStrings::trCustomTabFill + prefsData->itemToolPrefs.textTabFillChar);
+	}
+
+	textTabWidthSpinBox->setValue(prefsData->itemToolPrefs.textTabWidth * unitRatio);
+	textColumnsSpinBox->setValue(prefsData->itemToolPrefs.textColumns);
+	textColumnGapSpinBox->setValue(prefsData->itemToolPrefs.textColumnGap * unitRatio);
+
+
 /*
 			polygonCornerCountSpinBox
 			polygonRotationSpinBox
@@ -106,19 +176,46 @@
 
 			*/
 
+	//Image Tool
 
-	//Shape Tool
+//TODO	imageFrameLineColorComboBox
+//TODO	imageFrameLineShadingSpinBox
 
-//			shapeFrameFillColorComboBox
-//			shapeFrameLineColorComboBox
-//			shapeFrameLineStyleComboBox
-//			shapeLineWidthSpinBox
-//			shapeFrameFillShadingSpinBox
-//			shapeFrameLineShadingSpinBox
+	imageFreeScalingRadioButton->setChecked( prefsData->itemToolPrefs.imageScaleType );
+	imageFrameScalingRadioButton->setChecked( !prefsData->itemToolPrefs.imageScaleType );
+	imageHorizontalScalingSpinBox->setValue(qRound(prefsData->itemToolPrefs.imageScaleX * 100));
+	imageVerticalScalingSpinBox->setValue(qRound(prefsData->itemToolPrefs.imageScaleY * 100));
 
+	imageKeepAspectRatioCheckBox->setChecked(prefsData->itemToolPrefs.imageAspectRatio);
 
+	imageFrameFillColorComboBox->clear();
+	imageFrameFillColorComboBox->addItem(CommonStrings::tr_NoneColor);
+	if (prefsData->itemToolPrefs.imageFillColor == CommonStrings::None)
+		imageFrameFillColorComboBox->setCurrentIndex(imageFrameFillColorComboBox->count()-1);
+	endOfColorList=colorList->end();
+	for (itc = colorList->begin(); itc != endOfColorList; ++itc)
+	{
+		imageFrameFillColorComboBox->insertFancyItem( itc.value(), m_doc, itc.key() );
+		if (itc.key() == prefsData->itemToolPrefs.imageFillColor)
+			imageFrameFillColorComboBox->setCurrentIndex(imageFrameFillColorComboBox->count()-1);
+	}
 
+	imageFrameFillShadingSpinBox->setValue(prefsData->itemToolPrefs.imageFillColorShade );
+	imageUseEmbeddedClippingPathCheckBox->setChecked(prefsData->itemToolPrefs.imageUseEmbeddedPath);
+	switch (prefsData->itemToolPrefs.imageLowResType)
+	{
+		case 0:
+			onscreenResolutionFullRadioButton->setChecked(true);
+			break;
+		case 1:
+			onscreenResolutionNormalRadioButton->setChecked(true);
+			break;
+		case 2:
+			onscreenResolutionLowRadioButton->setChecked(true);
+			break;
+	}
 
+	//Shape Tool
 	shapeFrameLineColorComboBox->clear();
 	shapeFrameLineColorComboBox->addItem(CommonStrings::tr_NoneColor);
 	if (prefsData->itemToolPrefs.shapeLineColor == CommonStrings::None)
@@ -149,7 +246,7 @@
 	shapeLineWidthSpinBox->setValue(prefsData->itemToolPrefs.shapeLineWidth);
 
 	//Polygon Tool
-//	polygonCornerCountSpinBox
+//TODO	polygonCornerCountSpinBox
 //	polygonRotationSpinBox
 //	applyFactorCheckBox
 //	polygonFactorSpinBox
@@ -202,6 +299,78 @@
 void Prefs_ItemTools::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
 {
 
+	//Text Tool
+	prefsData->itemToolPrefs.textFont = textFontComboBox->currentText();
+	prefsData->itemToolPrefs.textSize = textSizeSpinBox->value() * 10;
+	prefsData->itemToolPrefs.textFillColor = textFrameFillColorComboBox->currentText();
+	if (prefsData->itemToolPrefs.textFillColor == CommonStrings::tr_NoneColor)
+		prefsData->itemToolPrefs.textFillColor = CommonStrings::None;
+	prefsData->itemToolPrefs.textLineColor = textFrameLineColorComboBox->currentText();
+	if (prefsData->itemToolPrefs.textLineColor == CommonStrings::tr_NoneColor)
+		prefsData->itemToolPrefs.textLineColor = CommonStrings::None;
+	prefsData->itemToolPrefs.textFillColorShade = textFrameFillShadingSpinBox->value();
+	prefsData->itemToolPrefs.textLineColorShade = textFrameLineShadingSpinBox->value();
+	prefsData->itemToolPrefs.textShade = textColorShadingSpinBox->value();
+	prefsData->itemToolPrefs.textStrokeShade = textStrokeShadingSpinBox->value();
+	prefsData->itemToolPrefs.textColor = textColorComboBox->currentText();
+	if (prefsData->itemToolPrefs.textColor == CommonStrings::tr_NoneColor)
+		prefsData->itemToolPrefs.textColor = CommonStrings::None;
+	prefsData->itemToolPrefs.textStrokeColor = textStrokeColorComboBox->currentText();
+	if (prefsData->itemToolPrefs.textStrokeColor == CommonStrings::tr_NoneColor)
+		prefsData->itemToolPrefs.textStrokeColor = CommonStrings::None;
+	prefsData->itemToolPrefs.textColumns = textColumnsSpinBox->value();
+	int docUnitIndex = prefsData->docSetupPrefs.docUnitIndex;
+	double unitRatio = unitGetRatioFromIndex(docUnitIndex);
+	prefsData->itemToolPrefs.textColumnGap = textColumnGapSpinBox->value() / unitRatio;
+	prefsData->itemToolPrefs.textTabWidth = textTabWidthSpinBox->value() / unitRatio;
+
+	switch (textTabFillCharComboBox->currentIndex())
+	{
+		case 0:
+			prefsData->itemToolPrefs.textTabFillChar = "";
+			break;
+		case 1:
+			prefsData->itemToolPrefs.textTabFillChar = ".";
+			break;
+		case 2:
+			prefsData->itemToolPrefs.textTabFillChar = "-";
+			break;
+		case 3:
+			prefsData->itemToolPrefs.textTabFillChar = "_";
+			break;
+		case 4:
+			prefsData->itemToolPrefs.textTabFillChar = textTabFillCharComboBox->currentText().right(1);
+			break;
+	}
+
+
+
+
+	//Image Tool
+//
+//	TODO imageFrameLineColorComboBox
+//	TODO imageFrameLineShadingSpinBox
+//	TODO scalingLockToolButton
+
+	prefsData->itemToolPrefs.imageFillColor = imageFrameFillColorComboBox->currentText();
+	if (prefsData->itemToolPrefs.imageFillColor == CommonStrings::tr_NoneColor)
+		prefsData->itemToolPrefs.imageFillColor = CommonStrings::None;
+	prefsData->itemToolPrefs.imageFillColorShade = imageFrameFillShadingSpinBox->value();
+	prefsData->itemToolPrefs.imageScaleX = static_cast<double>(imageHorizontalScalingSpinBox->value()) / 100.0;
+	prefsData->itemToolPrefs.imageScaleY = static_cast<double>(imageVerticalScalingSpinBox->value()) / 100.0;
+	prefsData->itemToolPrefs.imageScaleType = imageFreeScalingRadioButton->isChecked();
+	prefsData->itemToolPrefs.imageAspectRatio = imageKeepAspectRatioCheckBox->isChecked();
+	prefsData->itemToolPrefs.imageUseEmbeddedPath = imageUseEmbeddedClippingPathCheckBox->isChecked();
+	int haRes = 0;
+	if (onscreenResolutionFullRadioButton->isChecked())
+		haRes = 0;
+	if (onscreenResolutionNormalRadioButton->isChecked())
+		haRes = 1;
+	if (onscreenResolutionLowRadioButton->isChecked())
+		haRes = 2;
+	prefsData->itemToolPrefs.imageLowResType = haRes;
+
+
 	//Shape tool
 	prefsData->itemToolPrefs.shapeLineColor = shapeFrameLineColorComboBox->currentText();
 	if (prefsData->itemToolPrefs.shapeLineColor == CommonStrings::tr_NoneColor)
Index: scribus/ui/prefs_itemtoolsbase.ui
===================================================================
--- scribus/ui/prefs_itemtoolsbase.ui	(revision 14387)
+++ scribus/ui/prefs_itemtoolsbase.ui	(revision 14388)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>571</width>
-    <height>756</height>
+    <width>563</width>
+    <height>747</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -67,11 +67,11 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>497</width>
-            <height>626</height>
+            <width>489</width>
+            <height>617</height>
            </rect>
           </property>
-          <layout class="QVBoxLayout" name="verticalLayout_9">
+          <layout class="QVBoxLayout" name="verticalLayout_2">
            <item>
             <layout class="QHBoxLayout" name="horizontalLayout_5">
              <item>
@@ -90,7 +90,11 @@
                 </widget>
                </item>
                <item row="2" column="1">
-                <widget class="QSpinBox" name="textColumnsSpinBox"/>
+                <widget class="QSpinBox" name="textColumnsSpinBox">
+                 <property name="minimum">
+                  <number>1</number>
+                 </property>
+                </widget>
                </item>
                <item row="3" column="0">
                 <widget class="QLabel" name="label_17">
@@ -100,7 +104,7 @@
                 </widget>
                </item>
                <item row="3" column="1">
-                <widget class="QSpinBox" name="textColumnGapSpinBox"/>
+                <widget class="ScrSpinBox" name="textColumnGapSpinBox"/>
                </item>
                <item row="4" column="0">
                 <widget class="QLabel" name="label_9">
@@ -120,7 +124,7 @@
                 </widget>
                </item>
                <item row="5" column="1">
-                <widget class="QSpinBox" name="textTabWidthSpinBox"/>
+                <widget class="ScrSpinBox" name="textTabWidthSpinBox"/>
                </item>
                <item row="0" column="1">
                 <widget class="ColorCombo" name="textFrameFillColorComboBox"/>
@@ -177,10 +181,24 @@
                 </widget>
                </item>
                <item row="1" column="1">
-                <widget class="QSpinBox" name="textFrameLineShadingSpinBox"/>
+                <widget class="QSpinBox" name="textFrameLineShadingSpinBox">
+                 <property name="suffix">
+                  <string> %</string>
+                 </property>
+                 <property name="maximum">
+                  <number>100</number>
+                 </property>
+                </widget>
                </item>
                <item row="0" column="1">
-                <widget class="QSpinBox" name="textFrameFillShadingSpinBox"/>
+                <widget class="QSpinBox" name="textFrameFillShadingSpinBox">
+                 <property name="suffix">
+                  <string> %</string>
+                 </property>
+                 <property name="maximum">
+                  <number>100</number>
+                 </property>
+                </widget>
                </item>
               </layout>
              </item>
@@ -236,57 +254,73 @@
             </widget>
            </item>
            <item>
+            <layout class="QHBoxLayout" name="horizontalLayout_8">
+             <item>
+              <layout class="QFormLayout" name="formLayout">
+               <property name="fieldGrowthPolicy">
+                <enum>QFormLayout::FieldsStayAtSizeHint</enum>
+               </property>
+               <item row="0" column="0">
+                <widget class="QLabel" name="label_3">
+                 <property name="text">
+                  <string>Font:</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="0" column="1">
+                <widget class="FontCombo" name="textFontComboBox"/>
+               </item>
+               <item row="1" column="0">
+                <widget class="QLabel" name="label_4">
+                 <property name="text">
+                  <string>Size:</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="1">
+                <widget class="ScrSpinBox" name="textSizeSpinBox"/>
+               </item>
+              </layout>
+             </item>
+             <item>
+              <spacer name="horizontalSpacer_14">
+               <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>
             <layout class="QHBoxLayout" name="horizontalLayout_3">
              <item>
-              <layout class="QVBoxLayout" name="verticalLayout_2">
-               <item>
-                <layout class="QFormLayout" name="formLayout">
-                 <item row="0" column="0">
-                  <widget class="QLabel" name="label_3">
-                   <property name="text">
-                    <string>Font:</string>
-                   </property>
-                  </widget>
-                 </item>
-                 <item row="0" column="1">
-                  <widget class="FontCombo" name="textFontComboBox"/>
-                 </item>
-                 <item row="1" column="0">
-                  <widget class="QLabel" name="label_4">
-                   <property name="text">
-                    <string>Size:</string>
-                   </property>
-                  </widget>
-                 </item>
-                 <item row="1" column="1">
-                  <widget class="QSpinBox" name="textSizeSpinBox"/>
-                 </item>
-                </layout>
+              <layout class="QFormLayout" name="formLayout_14">
+               <item row="0" column="0">
+                <widget class="QLabel" name="label_5">
+                 <property name="text">
+                  <string>Color:</string>
+                 </property>
+                </widget>
                </item>
-               <item>
-                <layout class="QFormLayout" name="formLayout_14">
-                 <item row="0" column="0">
-                  <widget class="QLabel" name="label_5">
-                   <property name="text">
-                    <string>Color:</string>
-                   </property>
-                  </widget>
-                 </item>
-                 <item row="0" column="1">
-                  <widget class="ColorCombo" name="textColorComboBox"/>
-                 </item>
-                 <item row="1" column="0">
-                  <widget class="QLabel" name="label_6">
-                   <property name="text">
-                    <string>Stroke:</string>
-                   </property>
-                  </widget>
-                 </item>
-                 <item row="1" column="1">
-                  <widget class="ColorCombo" name="textStrokeColorComboBox"/>
-                 </item>
-                </layout>
+               <item row="0" column="1">
+                <widget class="ColorCombo" name="textColorComboBox"/>
                </item>
+               <item row="1" column="0">
+                <widget class="QLabel" name="label_6">
+                 <property name="text">
+                  <string>Stroke:</string>
+                 </property>
+                </widget>
+               </item>
+               <item row="1" column="1">
+                <widget class="ColorCombo" name="textStrokeColorComboBox"/>
+               </item>
               </layout>
              </item>
              <item>
@@ -306,52 +340,49 @@
               </spacer>
              </item>
              <item>
-              <layout class="QVBoxLayout" name="verticalLayout_8">
-               <item>
-                <spacer name="verticalSpacer_10">
-                 <property name="orientation">
-                  <enum>Qt::Vertical</enum>
+              <layout class="QFormLayout" name="formLayout_2">
+               <property name="sizeConstraint">
+                <enum>QLayout::SetDefaultConstraint</enum>
+               </property>
+               <property name="fieldGrowthPolicy">
+                <enum>QFormLayout::FieldsStayAtSizeHint</enum>
+               </property>
+               <property name="verticalSpacing">
+                <number>2</number>
+               </property>
+               <item row="0" column="0">
+                <widget class="QLabel" name="label_16">
+                 <property name="text">
+                  <string>Shading:</string>
                  </property>
-                 <property name="sizeHint" stdset="0">
-                  <size>
-                   <width>20</width>
-                   <height>40</height>
-                  </size>
+                </widget>
+               </item>
+               <item row="0" column="1">
+                <widget class="QSpinBox" name="textColorShadingSpinBox">
+                 <property name="suffix">
+                  <string> %</string>
                  </property>
-                </spacer>
+                 <property name="maximum">
+                  <number>100</number>
+                 </property>
+                </widget>
                </item>
-               <item>
-                <layout class="QFormLayout" name="formLayout_2">
-                 <property name="sizeConstraint">
-                  <enum>QLayout::SetDefaultConstraint</enum>
+               <item row="1" column="0">
+                <widget class="QLabel" name="label_15">
+                 <property name="text">
+                  <string>Shading:</string>
                  </property>
-                 <property name="fieldGrowthPolicy">
-                  <enum>QFormLayout::FieldsStayAtSizeHint</enum>
+                </widget>
+               </item>
+               <item row="1" column="1">
+                <widget class="QSpinBox" name="textStrokeShadingSpinBox">
+                 <property name="suffix">
+                  <string> %</string>
                  </property>
-                 <property name="verticalSpacing">
-                  <number>2</number>
+                 <property name="maximum">
+                  <number>100</number>
                  </property>
-                 <item row="0" column="0">
-                  <widget class="QLabel" name="label_16">
-                   <property name="text">
-                    <string>Shading:</string>
-                   </property>
-                  </widget>
-                 </item>
-                 <item row="0" column="1">
-                  <widget class="QSpinBox" name="textColorShadingSpinBox"/>
-                 </item>
-                 <item row="1" column="0">
-                  <widget class="QLabel" name="label_15">
-                   <property name="text">
-                    <string>Shading:</string>
-                   </property>
-                  </widget>
-                 </item>
-                 <item row="1" column="1">
-                  <widget class="QSpinBox" name="textStrokeShadingSpinBox"/>
-                 </item>
-                </layout>
+                </widget>
                </item>
               </layout>
              </item>
@@ -362,7 +393,7 @@
                </property>
                <property name="sizeHint" stdset="0">
                 <size>
-                 <width>28</width>
+                 <width>40</width>
                  <height>20</height>
                 </size>
                </property>
@@ -505,10 +536,24 @@
             </widget>
            </item>
            <item row="1" column="1">
-            <widget class="QSpinBox" name="imageFrameLineShadingSpinBox"/>
+            <widget class="QSpinBox" name="imageFrameLineShadingSpinBox">
+             <property name="suffix">
+              <string> %</string>
+             </property>
+             <property name="maximum">
+              <number>100</number>
+             </property>
+            </widget>
            </item>
            <item row="0" column="1">
-            <widget class="QSpinBox" name="imageFrameFillShadingSpinBox"/>
+            <widget class="QSpinBox" name="imageFrameFillShadingSpinBox">
+             <property name="suffix">
+              <string> %</string>
+             </property>
+             <property name="maximum">
+              <number>100</number>
+             </property>
+            </widget>
            </item>
           </layout>
          </item>
@@ -575,6 +620,9 @@
          <property name="text">
           <string>Free Scaling</string>
          </property>
+         <attribute name="buttonGroup">
+          <string>scalingButtonGroup</string>
+         </attribute>
         </widget>
        </item>
        <item>
@@ -589,7 +637,14 @@
             </widget>
            </item>
            <item row="0" column="1">
-            <widget class="QSpinBox" name="imageHorizontalScalingSpinBox"/>
+            <widget class="QSpinBox" name="imageHorizontalScalingSpinBox">
+             <property name="suffix">
+              <string> %</string>
+             </property>
+             <property name="maximum">
+              <number>100</number>
+             </property>
+            </widget>
            </item>
            <item row="1" column="0">
             <widget class="QLabel" name="label_20">
@@ -599,7 +654,14 @@
             </widget>
            </item>
            <item row="1" column="1">
-            <widget class="QSpinBox" name="imageVerticalScalingSpinBox"/>
+            <widget class="QSpinBox" name="imageVerticalScalingSpinBox">
+             <property name="suffix">
+              <string> %</string>
+             </property>
+             <property name="maximum">
+              <number>100</number>
+             </property>
+            </widget>
            </item>
           </layout>
          </item>
@@ -630,6 +692,9 @@
          <property name="text">
           <string>Scale Image to Frame Size</string>
          </property>
+         <attribute name="buttonGroup">
+          <string>scalingButtonGroup</string>
+         </attribute>
         </widget>
        </item>
        <item>
@@ -696,6 +761,9 @@
          <property name="text">
           <string>Full Resolution</string>
          </property>
+         <attribute name="buttonGroup">
+          <string>previewButtonGroup</string>
+         </attribute>
         </widget>
        </item>
        <item>
@@ -703,6 +771,9 @@
          <property name="text">
           <string>Normal Resolution</string>
          </property>
+         <attribute name="buttonGroup">
+          <string>previewButtonGroup</string>
+         </attribute>
         </widget>
        </item>
        <item>
@@ -710,6 +781,9 @@
          <property name="text">
           <string>Low Resolution</string>
          </property>
+         <attribute name="buttonGroup">
+          <string>previewButtonGroup</string>
+         </attribute>
         </widget>
        </item>
        <item>
@@ -1173,4 +1247,8 @@
  </customwidgets>
  <resources/>
  <connections/>
+ <buttongroups>
+  <buttongroup name="previewButtonGroup"/>
+  <buttongroup name="scalingButtonGroup"/>
+ </buttongroups>
 </ui>




More information about the scribus-commit mailing list