r14159 by fschmid - Reduced the minimum height required for the color tab of the properties palette.

scribus-commit scribus-commit at lists.scribus.net
Fri Oct 16 10:30:30 CEST 2009


Revision: 14159
Author: fschmid
Date: 2009-10-16T06:39:28.535278Z
Commit message: Reduced the minimum height required for the color tab of the properties palette.

Changeset: 
M  /trunk/Scribus/scribus/ui/propertiespalette.cpp
M  /trunk/Scribus/scribus/ui/gradienteditor.ui
M  /trunk/Scribus/scribus/ui/propertiespalette.h
M  /trunk/Scribus/scribus/ui/cpalette.cpp
M  /trunk/Scribus/scribus/ui/cpalette.h
M  /trunk/Scribus/scribus/ui/colorpalette.ui

Diffs:
Index: scribus/ui/cpalette.cpp
===================================================================
--- scribus/ui/cpalette.cpp	(revision 14158)
+++ scribus/ui/cpalette.cpp	(revision 14159)
@@ -318,6 +318,7 @@
 	connect(gradEdit, SIGNAL(gradientChanged()), this, SIGNAL(gradientChanged()));
 	connect(editPatternProps, SIGNAL(clicked()), this, SLOT(changePatternProps()));
 	connect(namedGradient, SIGNAL(activated(const QString &)), this, SLOT(setNamedGradient(const QString &)));
+	connect(overPrintCombo, SIGNAL(activated(int)), this, SIGNAL(NewOverprint(int)));
 	editFillColorSelector->setChecked(true);
 	editFillColorSelectorButton();
 }
@@ -353,6 +354,10 @@
 	updateCList();
 	setActTrans(currentItem->fillTransparency(), currentItem->lineTransparency());
 	setActBlend(currentItem->fillBlendmode(), currentItem->lineBlendmode());
+	if (currentItem->doOverprint)
+		setActOverprint(1);
+	else
+		setActOverprint(0);
 	setActFarben(currentItem->lineColor(), currentItem->fillColor(), currentItem->lineShade(), currentItem->fillShade());
 	ChooseGrad(currentItem->GrType);
 	gradEdit->setGradient(currentItem->fill_gradient);
@@ -424,11 +429,18 @@
 	disconnect(blendModeFill, SIGNAL(activated(int)), this, SIGNAL(NewBlend(int)));
 	disconnect(blendModeStroke, SIGNAL(activated(int)), this, SIGNAL(NewBlendS(int)));
 	blendModeFill->setCurrentIndex(val);
-	blendModeStroke->setCurrentIndex(val);
+	blendModeStroke->setCurrentIndex(val2);
 	connect(blendModeFill, SIGNAL(activated(int)), this, SIGNAL(NewBlend(int)));
 	connect(blendModeStroke, SIGNAL(activated(int)), this, SIGNAL(NewBlendS(int)));
 }
 
+void Cpalette::setActOverprint(int val)
+{
+	disconnect(overPrintCombo, SIGNAL(activated(int)), this, SIGNAL(NewOverprint(int)));
+	overPrintCombo->setCurrentIndex(val);
+	connect(overPrintCombo, SIGNAL(activated(int)), this, SIGNAL(NewOverprint(int)));
+}
+
 void Cpalette::setActFarben(QString p, QString b, int shp, int shb)
 {
 	disconnect(fillShade, SIGNAL(valueChanged(int)), this, SIGNAL(NewBrushShade(int)));
Index: scribus/ui/colorpalette.ui
===================================================================
--- scribus/ui/colorpalette.ui	(revision 14158)
+++ scribus/ui/colorpalette.ui	(revision 14159)
@@ -6,21 +6,21 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>250</width>
-    <height>418</height>
+    <width>236</width>
+    <height>405</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout_3">
+  <layout class="QGridLayout" name="gridLayout">
+   <property name="margin">
+    <number>2</number>
+   </property>
    <property name="spacing">
     <number>2</number>
    </property>
-   <property name="margin">
-    <number>5</number>
-   </property>
-   <item>
+   <item row="0" column="0" colspan="2">
     <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
       <widget class="QToolButton" name="editLineColorSelector">
@@ -69,7 +69,7 @@
      </item>
     </layout>
    </item>
-   <item>
+   <item row="1" column="0" colspan="2">
     <widget class="QStackedWidget" name="stackedWidget">
      <property name="currentIndex">
       <number>0</number>
@@ -275,35 +275,39 @@
           <attribute name="title">
            <string>Gradient</string>
           </attribute>
-          <layout class="QGridLayout" name="gridLayout">
-           <property name="margin">
-            <number>5</number>
-           </property>
-           <property name="spacing">
-            <number>2</number>
-           </property>
-           <item row="0" column="0">
-            <widget class="QLabel" name="label_10">
-             <property name="text">
-              <string>Type:</string>
-             </property>
-            </widget>
-           </item>
-           <item row="0" column="1">
-            <widget class="QComboBox" name="gradientType">
+          <layout class="QVBoxLayout" name="verticalLayout_4">
+           <item>
+            <layout class="QHBoxLayout" name="horizontalLayout_3">
              <item>
-              <property name="text">
-               <string>Linear</string>
-              </property>
+              <widget class="QComboBox" name="gradientType">
+               <item>
+                <property name="text">
+                 <string>Linear</string>
+                </property>
+               </item>
+               <item>
+                <property name="text">
+                 <string>Radial</string>
+                </property>
+               </item>
+              </widget>
              </item>
              <item>
-              <property name="text">
-               <string>Radial</string>
-              </property>
+              <widget class="QToolButton" name="gradEditButton">
+               <property name="toolTip">
+                <string>Move the start of the gradient vector with the left mouse button pressed and move the end of the gradient vector with the right mouse button pressed</string>
+               </property>
+               <property name="text">
+                <string>Move Vector</string>
+               </property>
+               <property name="checkable">
+                <bool>true</bool>
+               </property>
+              </widget>
              </item>
-            </widget>
+            </layout>
            </item>
-           <item row="1" column="0" colspan="2">
+           <item>
             <widget class="GradientEditor" name="gradEdit">
              <property name="sizePolicy">
               <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
@@ -314,7 +318,7 @@
              <property name="minimumSize">
               <size>
                <width>200</width>
-               <height>80</height>
+               <height>173</height>
               </size>
              </property>
              <property name="frameShape">
@@ -325,39 +329,9 @@
              </property>
             </widget>
            </item>
-           <item row="2" column="0" colspan="2">
+           <item>
             <widget class="ScComboBox" name="namedGradient"/>
            </item>
-           <item row="3" column="0" colspan="2">
-            <layout class="QHBoxLayout" name="horizontalLayout_3">
-             <item>
-              <widget class="QToolButton" name="gradEditButton">
-               <property name="toolTip">
-                <string>Move the start of the gradient vector with the left mouse button pressed and move the end of the gradient vector with the right mouse button pressed</string>
-               </property>
-               <property name="text">
-                <string>Move Vector</string>
-               </property>
-               <property name="checkable">
-                <bool>true</bool>
-               </property>
-              </widget>
-             </item>
-             <item>
-              <spacer name="horizontalSpacer_2">
-               <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>
           </layout>
          </widget>
          <widget class="QWidget" name="tabPattern">
@@ -539,7 +513,7 @@
      </widget>
     </widget>
    </item>
-   <item>
+   <item row="2" column="0" colspan="2">
     <widget class="QCheckBox" name="displayAllColors">
      <property name="toolTip">
       <string>Display all colors from the document color list, or only the already used colors</string>
@@ -549,6 +523,30 @@
      </property>
     </widget>
    </item>
+   <item row="3" column="0">
+    <widget class="QLabel" name="label_7">
+     <property name="text">
+      <string>Overprinting</string>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1">
+    <widget class="QComboBox" name="overPrintCombo">
+     <item>
+      <property name="text">
+       <string>Knockout</string>
+      </property>
+     </item>
+     <item>
+      <property name="text">
+       <string>Overprint</string>
+      </property>
+     </item>
+    </widget>
+   </item>
   </layout>
  </widget>
  <customwidgets>
Index: scribus/ui/cpalette.h
===================================================================
--- scribus/ui/cpalette.h	(revision 14158)
+++ scribus/ui/cpalette.h	(revision 14159)
@@ -139,6 +139,7 @@
 	void SetColors(ColorList newColorList);
 	void setActTrans(double, double);
 	void setActBlend(int, int);
+	void setActOverprint(int);
 	void slotTransS(int val);
 	void slotTransF(int val);
 	void updateCList();
@@ -175,6 +176,7 @@
 	void NewTransS(double);
 	void NewBlend(int);
 	void NewBlendS(int);
+	void NewOverprint(int);
 	void gradientChanged();
 	void editGradient();
 
Index: scribus/ui/gradienteditor.ui
===================================================================
--- scribus/ui/gradienteditor.ui	(revision 14158)
+++ scribus/ui/gradienteditor.ui	(revision 14159)
@@ -28,6 +28,12 @@
    </property>
    <item row="0" column="0" colspan="2">
     <widget class="GradientPreview" name="Preview">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
      <property name="minimumSize">
       <size>
        <width>200</width>
Index: scribus/ui/propertiespalette.h
===================================================================
--- scribus/ui/propertiespalette.h	(revision 14158)
+++ scribus/ui/propertiespalette.h	(revision 14159)
@@ -306,7 +306,7 @@
 	void handlePathDist();
 	void handlePathOffs();
 	void handleFillRule();
-	void handleOverprint();
+	void handleOverprint(int);
 	void ChangeProfile(const QString& prn);
 	void ChangeIntent();
 	void NewName();
@@ -350,7 +350,7 @@
 	QVBoxLayout* pageLayout_5a;
 	QVBoxLayout* pageLayout_5b;
 	QVBoxLayout* pageLayout_6;
-	QVBoxLayout* OverPLayout;
+//	QVBoxLayout* OverPLayout;
 	QVBoxLayout* TLineLayout;
 	QHBoxLayout* layout60;
 	QGridLayout* Layout44;
@@ -485,7 +485,7 @@
 	QGroupBox* ShapeGroup;
 	QGroupBox* ShapeGroup2;
 	QGroupBox* Distance3;
-	QGroupBox* OverP;
+//	QGroupBox* OverP;
 
 	QToolButton* TabsButton;
 
@@ -583,8 +583,8 @@
 	QRadioButton* FrameScale;
 	QRadioButton* EvenOdd;
 	QRadioButton* NonZero;
-	QRadioButton* KnockOut;
-	QRadioButton* Overprint;
+//	QRadioButton* KnockOut;
+//	QRadioButton* Overprint;
 	QRadioButton* flopRealHeight;
 	QRadioButton* flopFontAscent;
 	QRadioButton* flopLineSpacing;
Index: scribus/ui/propertiespalette.cpp
===================================================================
--- scribus/ui/propertiespalette.cpp	(revision 14158)
+++ scribus/ui/propertiespalette.cpp	(revision 14159)
@@ -1478,7 +1478,7 @@
 	Cpal = new Cpalette(page_6);
 	pageLayout_6->addWidget( Cpal );
 
-	OverP = new QGroupBox( "Overprinting", page_6 );
+/*	OverP = new QGroupBox( "Overprinting", page_6 );
 	OverPLayout = new QVBoxLayout( OverP );
 	OverPLayout->setSpacing( 2 );
 	OverPLayout->setMargin( 5 );
@@ -1489,7 +1489,7 @@
 	OverPLayout->addWidget( Overprint );
 	KnockOut->setChecked( true );
 	pageLayout_6->addWidget(OverP);
-
+*/
 	idColorsItem = TabStack->addItem(page_6, "&Colors" );
 	MpalLayout->addWidget( TabStack );
 
@@ -1594,8 +1594,6 @@
 	connect(lineSpacingModeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(setLineSpacingMode(int)));
 	connect( EvenOdd, SIGNAL( clicked() ), this, SLOT(handleFillRule() ) );
 	connect( NonZero, SIGNAL( clicked() ), this, SLOT( handleFillRule() ) );
-	connect( KnockOut, SIGNAL( clicked() ), this, SLOT( handleOverprint() ) );
-	connect( Overprint, SIGNAL( clicked() ), this, SLOT( handleOverprint() ) );
 	connect(TransSpin, SIGNAL(valueChanged(int)), this, SLOT(setGroupTransparency(int)));
 	connect(blendMode, SIGNAL(activated(int)), this, SLOT(setGroupBlending(int)));
 	connect(DoGroup, SIGNAL(clicked()), this, SLOT(doGrouping()) );
@@ -1815,8 +1813,10 @@
 			Cpal->setActGradient(CurItem->GrType);
 			updateColorSpecialGradient();
 			Cpal->gradEdit->setGradient(CurItem->fill_gradient);
-			KnockOut->setChecked(!CurItem->doOverprint);
-			Overprint->setChecked(CurItem->doOverprint);
+			if (CurItem->doOverprint)
+				Cpal->setActOverprint(1);
+			else
+				Cpal->setActOverprint(0);
 		}
 		else if (t == idGroupItem)
 		{
@@ -1866,6 +1866,7 @@
 	disconnect(this->Cpal, SIGNAL(NewBlendS(int)), 0, 0);
 	disconnect(this->Cpal, SIGNAL(NewPattern(QString)), 0, 0);
 	disconnect(this->Cpal, SIGNAL(NewPatternProps(double, double, double, double, double)), 0, 0);
+	disconnect(this->Cpal, SIGNAL(NewOverprint(int)), 0, 0);
 
 	doc = d;
 	CurItem = NULL;
@@ -1940,6 +1941,7 @@
 	connect(this->Cpal, SIGNAL(NewGradient(int)), doc, SLOT(itemSelection_SetItemGradFill(int)));
 	connect(this->Cpal, SIGNAL(NewPattern(QString)), doc, SLOT(itemSelection_SetItemPatternFill(QString)));
 	connect(this->Cpal, SIGNAL(NewPatternProps(double, double, double, double, double)), doc, SLOT(itemSelection_SetItemPatternProps(double, double, double, double, double)));
+	connect(this->Cpal, SIGNAL(NewOverprint(int)), this, SLOT(handleOverprint(int)));
 }
 
 void PropertiesPalette::unsetDoc()
@@ -2331,8 +2333,10 @@
 	{
 		RoundRect->setEnabled ((CurItem->asPolygon()) &&  (!CurItem->ClipEdited)  && ((CurItem->FrameType == 0) || (CurItem->FrameType == 2)));
 	}
-	KnockOut->setChecked(!CurItem->doOverprint);
-	Overprint->setChecked(CurItem->doOverprint);
+	if (CurItem->doOverprint)
+		Cpal->setActOverprint(1);
+	else
+		Cpal->setActOverprint(0);
 	if ((CurItem->itemType() == PageItem::Line) && LMode)
 	{
 		xposLabel->setText( tr( "&X1:" ) );
@@ -4954,11 +4958,14 @@
 	emit DocChanged();
 }
 
-void PropertiesPalette::handleOverprint()
+void PropertiesPalette::handleOverprint(int val)
 {
 	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
 		return;
-	doc->itemSelection_SetOverprint(Overprint->isChecked());
+	bool setter = true;
+	if (val == 0)
+		setter = false;
+	doc->itemSelection_SetOverprint(setter);
 }
 
 void PropertiesPalette::NewName()
@@ -5303,9 +5310,9 @@
 	RightLine->setText( tr("Line at the Right "));
 	BottomLine->setText( tr("Line at Bottom"));
 	
-	OverP->setTitle( tr("Overprinting"));
-	KnockOut->setText( tr("Knockout"));
-	Overprint->setText( tr("Overprint"));
+//	OverP->setTitle( tr("Overprinting"));
+//	KnockOut->setText( tr("Knockout"));
+//	Overprint->setText( tr("Overprint"));
 
 	QString pctSuffix=tr(" %");
 	ChBase->setSuffix(pctSuffix);




More information about the scribus-commit mailing list