View Issue Details

IDProjectCategoryView StatusLast Update
0015812ScribusUser Interfacepublic2019-11-05 07:40
Reporterale Assigned Toale  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version1.5.6.svn 
Target VersionFixed in Version1.5.6.svn 
Summary0015812: [PATCH] Indigo UI: Properties palette: why is there a Group tab?
Description... or better said: why does the group tab have a copy in there of the shape and of the transparency panes?

is there a reason why the main "shape" and "transparency" tabs cannot be used?

if there is no reason for that, i would love to refactor the code so that the main tabs can be used and the group tab only contain the clipping option.

The final goal being to move the remaining part of the "group" tab to the content palette and leave the "shape" and "transparency" settings in the properties palette.

Any thoughts?
Tagspatch
PatchYes

Activities

ale

2019-09-10 11:58

manager   ~0046652

Last edited: 2019-09-10 13:53

View 2 revisions

jean could not tell a valid reason so i gave it a try...

the patch is attached and can also be reviewed on gitlab:

https://gitlab.com/scribus/scribus/merge_requests/6

The appimage is here:
https://gitlab.com/a.l.e/scribus/-/jobs/291713173/artifacts/file/Scribus-nightly-x86_64.AppImage

the patch basically:

- removes all the code for defining and managing the panes in the group tab (leaving only the "clip to group" checkbox)
- removes/modifies a few "isGroup()" that were blocking the "standalone" tabs to work on groups
- there are/were traces of symbols (i guess that linked scrapbook elements are meant there) but i cannot figure out what i should test there... i would be glad if somebody who knows about it can check that everything still works correctly also for symbols)

the final goal is to move the remaining "group" checkbox to its own pane of the content panel.



indigo-pp-group.diff (40,439 bytes)
diff --git a/scribus/scribusdoc.cpp b/scribus/scribusdoc.cpp
index 26cf40e8d..1242874f4 100644
--- a/scribus/scribusdoc.cpp
+++ b/scribus/scribusdoc.cpp
@@ -11479,9 +11479,9 @@ void ScribusDoc::itemSelection_SetItemFillTransparency(double t)
 	for (int i = 0; i < selectedItemCount; ++i)
 	{
 		PageItem *currItem = m_Selection->itemAt(i);
-		if (currItem->isGroup())
-			continue;
 		currItem->setFillTransparency(t);
+		if (currItem->isGroup())
+			currItem->update(); // FIXME: not sure this is needed
 	}
 	regionsChanged()->update(QRectF());
 	changed();
diff --git a/scribus/ui/propertiespalette.cpp b/scribus/ui/propertiespalette.cpp
index 378a02abc..958a25f74 100644
--- a/scribus/ui/propertiespalette.cpp
+++ b/scribus/ui/propertiespalette.cpp
@@ -49,6 +49,7 @@ for which a new license (GPL+exception) is in place.
 #include "propertiespalette_table.h"
 #include "propertiespalette_utils.h"
 #include "propertiespalette_xyz.h"
+#include "transparencypalette.h"
 #include "scribus.h"
 #include "scribusview.h"
 #include "selection.h"
@@ -104,8 +105,6 @@ PropertiesPalette::PropertiesPalette( QWidget* parent) : ScDockPalette( parent,
 	languageChange();
 
 	connect(linePal, SIGNAL(lineModeChanged(int)), this, SLOT(NewLineMode(int)));
-	connect(groupPal, SIGNAL(shapeChanged(int)) , this, SLOT(handleNewShape(int)));
-	connect(groupPal, SIGNAL(shapeEditStarted()), this, SLOT(handleShapeEdit()));
 	connect(TabStack, SIGNAL(currentChanged2(int)), this, SLOT(SelTab(int)));
 
 	connect(colorPalette, SIGNAL(NewSpecial(double,double,double,double,double,double,double,double,double,double)), this, SLOT(NewSpGradient(double,double,double,double,double,double,double,double,double,double )));
@@ -296,7 +295,6 @@ void PropertiesPalette::setTextFlowMode(PageItem::TextFlowMode mode)
 	if (!m_ScMW || m_ScMW->scriptIsRunning() || !m_haveItem)
 		return;
 	shapePal->showTextFlowMode(mode);
-	groupPal->showTextFlowMode(mode);
 }
 
 PageItem* PropertiesPalette::currentItemFromSelection()
@@ -384,11 +382,12 @@ void PropertiesPalette::setCurrentItem(PageItem *item)
 	{
 		TabStack->setItemEnabled(idXYZItem, true);
 		TabStack->setItemEnabled(idShadowItem, true);
-		TabStack->setItemEnabled(idShapeItem, false);
+		TabStack->setItemEnabled(idShapeItem, true);
 		TabStack->setItemEnabled(idGroupItem, true);
 		TabStack->setItemEnabled(idLineItem, false);
 		TabStack->setItemEnabled(idColorsItem, false);
 		TabStack->setItemEnabled(idImageItem, false);
+		TabStack->setItemEnabled(idTransparencyItem, true);
 		TabStack->setItemEnabled(idTableItem, false);
 	}
 	else
@@ -550,12 +549,12 @@ void  PropertiesPalette::handleSelectionChanged()
 		case PageItem::Symbol:
 		case PageItem::Group:
 			TabStack->setItemEnabled(idShadowItem, true);
-			TabStack->setItemEnabled(idShapeItem, false);
+			TabStack->setItemEnabled(idShapeItem, true);
 			TabStack->setItemEnabled(idImageItem, false);
 			TabStack->setItemEnabled(idLineItem, false);
 			TabStack->setItemEnabled(idGroupItem, true);
 			TabStack->setItemEnabled(idColorsItem, false);
-			TabStack->setItemEnabled(idTransparencyItem, false);
+			TabStack->setItemEnabled(idTransparencyItem, true);
 			break;
 		case PageItem::Table:
 			TabStack->setItemEnabled(idTableItem, true);
@@ -824,7 +823,6 @@ void PropertiesPalette::updateColorList()
 	if (!m_haveDoc || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 
-	groupPal->updateColorList();
 	tablePal->updateColorList();
 	colorPalette->updateColorList();
 	transparencyPalette->updateColorList();
@@ -892,8 +890,6 @@ void PropertiesPalette::updateColorSpecialGradient()
 	if(m_doc->m_Selection->isEmpty())
 		return;
 
-	groupPal->updateColorSpecialGradient();
-
 	PageItem *currItem=m_doc->m_Selection->itemAt(0);
 	if (currItem)
 	{
@@ -911,7 +907,7 @@ void PropertiesPalette::updateColorSpecialGradient()
 			colorPalette->setMeshPatchPoint();
 		else if (m_ScMW->view->editStrokeGradient == 9)
 			colorPalette->setMeshPatch();
-		else if (!currItem->isGroup())
+		else if (currItem->isGroup())
 			transparencyPalette->setSpecialGradient(currItem->GrMaskStartX, currItem->GrMaskStartY, currItem->GrMaskEndX, currItem->GrMaskEndY, currItem->GrMaskFocalX, currItem->GrMaskFocalY, currItem->GrMaskScale, currItem->GrMaskSkew);
 	}
 }
diff --git a/scribus/ui/propertiespalette_group.cpp b/scribus/ui/propertiespalette_group.cpp
index 9446dc75a..57de3628d 100644
--- a/scribus/ui/propertiespalette_group.cpp
+++ b/scribus/ui/propertiespalette_group.cpp
@@ -61,7 +61,6 @@ for which a new license (GPL+exception) is in place.
 #include "ui/propertiespalette.h"
 #include "ui/propertiespalette_utils.h"
 #include "ui/propertiespalette_xyz.h"
-#include "ui/transparencypalette.h"
 #include "undomanager.h"
 #include "units.h"
 #include "util.h"
@@ -69,65 +68,32 @@ for which a new license (GPL+exception) is in place.
 
 
 
-PropertiesPalette_Group::PropertiesPalette_Group( QWidget* parent) : QWidget(parent)
+PropertiesPalette_Group::PropertiesPalette_Group( QWidget* parent)
+	: QWidget(parent),
+	  m_haveDoc(false),
+	  m_haveItem(false),
+	  m_unitRatio(1.0),
+	  m_unitIndex(SC_PT),
+	  m_item(nullptr),
+	  m_doc(nullptr)
 {
-	m_ScMW = nullptr;
-	m_doc  = nullptr;
-	m_item = nullptr;
-	m_haveDoc   = false;
-	m_haveItem  = false;
-	m_unitIndex = 0;
-	m_unitRatio = 1.0;
-	m_userActionOn = false;
-
 	m_tmpSelection = new Selection(this, false);
 	m_tmpSelection->clear();
 
 	setupUi(this);
 	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
 
-	textFlowDisabled->setIcon(IconManager::instance().loadIcon("flow-none.png"));
-	textFlowUsesFrameShape->setIcon(IconManager::instance().loadIcon("flow-frame.png"));
-	textFlowUsesBoundingBox->setIcon(IconManager::instance().loadIcon("flow-bounding.png"));
-	textFlowUsesContourLine->setIcon(IconManager::instance().loadIcon("flow-contour.png"));
-	textFlowUsesImageClipping->setIcon(IconManager::instance().loadIcon("flow-contour.png"));
-
-	textFlowDisabled->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
-	textFlowUsesFrameShape->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
-	textFlowUsesBoundingBox->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
-	textFlowUsesContourLine->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
-	textFlowUsesImageClipping->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
-
-	transPalWidget->hideSelectionButtons();
-
 	languageChange();
 
-	connect(textFlowBtnGroup, SIGNAL(buttonClicked(int)), this, SLOT(handleTextFlow()));
-
-	connect(customShape  , SIGNAL(FormSel(int, int, qreal *)), this, SLOT(handleNewShape(int, int, qreal *)));
-	connect(editShape    , SIGNAL(clicked())                 , this, SLOT(handleShapeEdit()));
-	connect(evenOdd      , SIGNAL(clicked())                 , this, SLOT(handleFillRule()) );
-	connect(nonZero      , SIGNAL(clicked())                 , this, SLOT(handleFillRule()) );
 	connect(clipGroups   , SIGNAL(clicked())                 , this, SLOT(handleClipping()) );
-	connect(transPalWidget , SIGNAL(editGradient())          , this, SLOT(handleGradientEdit()));
-	connect(transPalWidget , SIGNAL(NewSpecial(double, double, double, double, double, double, double, double, double, double)), this, SLOT(handleSpecialGradient(double, double, double, double, double, double, double, double )));
 }
 
 PageItem* PropertiesPalette_Group::currentItemFromSelection()
 {
 	PageItem *currentItem = nullptr;
 
-	if (m_doc)
-	{
-		if (m_doc->m_Selection->count() > 1)
-		{
-			currentItem = m_doc->m_Selection->itemAt(0);
-		}
-		else if (m_doc->m_Selection->count() == 1)
-		{
-			currentItem = m_doc->m_Selection->itemAt(0);
-		}
-	}
+	if (m_doc && m_doc->m_Selection->count()>0)
+		currentItem = m_doc->m_Selection->itemAt(0);
 
 	return currentItem;
 }
@@ -136,7 +102,6 @@ void PropertiesPalette_Group::setMainWindow(ScribusMainWindow *mw)
 {
 	m_ScMW = mw;
 
-	connect(this->transPalWidget, SIGNAL(gradientChanged()), this, SLOT(handleGradientChanged()));
 	connect(m_ScMW, SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
 }
 
@@ -151,29 +116,14 @@ void PropertiesPalette_Group::setDoc(ScribusDoc *d)
 		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
 	}
 	
-	this->transPalWidget->disconnect(SIGNAL(NewTrans(double)));
-	this->transPalWidget->disconnect(SIGNAL(NewBlend(int)));
-	this->transPalWidget->disconnect(SIGNAL(NewGradient(int)));
-	this->transPalWidget->disconnect(SIGNAL(NewPattern(QString)));
-	this->transPalWidget->disconnect(SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)));
-
 	m_doc  = d;
 	m_item = nullptr;
 	m_unitRatio   = m_doc->unitRatio();
 	m_unitIndex   = m_doc->unitIndex();
 
-	transPalWidget->setDocument(m_doc);
-	transPalWidget->setCurrentItem(nullptr);
-
 	m_haveDoc  = true;
 	m_haveItem = false;
 
-	connect(this->transPalWidget, SIGNAL(NewTrans(double))   , this, SLOT(handleGroupTransparency(double)));
-	connect(this->transPalWidget, SIGNAL(NewBlend(int))      , this, SLOT(handleGroupBlending(int)));
-	connect(this->transPalWidget, SIGNAL(NewGradient(int))   , this, SLOT(handleGroupGradMask(int)));
-	connect(this->transPalWidget, SIGNAL(NewPattern(QString)), this, SLOT(handleGroupPatternMask(QString)));
-	connect(this->transPalWidget, SIGNAL(NewPatternProps(double, double, double, double, double, double, double, bool, bool)), this, SLOT(handleGroupPatternMaskProps(double, double, double, double, double, double, double, bool, bool)));
-
 	connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
 	connect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
 }
@@ -191,9 +141,6 @@ void PropertiesPalette_Group::unsetDoc()
 	m_doc   = nullptr;
 	m_item  = nullptr;
 
-	transPalWidget->setDocument(nullptr);
-	transPalWidget->setCurrentItem(nullptr);
-
 	setEnabled(false);
 }
 
@@ -201,7 +148,6 @@ void PropertiesPalette_Group::unsetItem()
 {
 	m_haveItem = false;
 	m_item     = nullptr;
-	transPalWidget->setCurrentItem(nullptr);
 	handleSelectionChanged();
 }
 
@@ -226,47 +172,18 @@ void PropertiesPalette_Group::handleSelectionChanged()
 		int itemType = currItem ? (int) currItem->itemType() : -1;
 		m_haveItem = (itemType != -1);
 
-		switch (itemType)
-		{
-		case -1:
-			setEnabled(false);
-			break;
-		case PageItem::ImageFrame:
-		case PageItem::LatexFrame:
-		case PageItem::OSGFrame:
-			if (currItem->asOSGFrame())
-			{
-				setEnabled(false);
-			}
-			break;
-		case PageItem::Arc:
-		case PageItem::TextFrame:
-		case PageItem::Line:
-		case PageItem::ItemType1:
-		case PageItem::ItemType3:
-		case PageItem::Polygon:
-		case PageItem::PolyLine:
-		case PageItem::PathText:
-		case PageItem::RegularPolygon:
-			setEnabled(false);
-			break;
-		case PageItem::Symbol:
+		if (itemType == PageItem::Symbol)
 			setEnabled(true);
-			break;
-		}
 	}
 	if (currItem)
 	{
 		setCurrentItem(currItem);
 	}
 	updateGeometry();
-	//repaint();
 }
 
 void PropertiesPalette_Group::handleUpdateRequest(int updateFlags)
 {
-	if (updateFlags & reqColorsUpdate)
-		updateColorList();
 }
 
 void PropertiesPalette_Group::setCurrentItem(PageItem *item)
@@ -286,290 +203,14 @@ void PropertiesPalette_Group::setCurrentItem(PageItem *item)
 	m_haveItem = false;
 	m_item = item;
 
-	bool   mirrorX, mirrorY;
-	double patternScaleX, patternScaleY, patternOffsetX, patternOffsetY, patternRotation, patternSkewX, patternSkewY;
-	m_item->patternTransform(patternScaleX, patternScaleY, patternOffsetX, patternOffsetY, patternRotation, patternSkewX, patternSkewY);
-	m_item->patternFlip(mirrorX, mirrorY);
-
-	transPalWidget->setCurrentItem(m_item);
-	nonZero->setChecked(!m_item->fillRule);
-	evenOdd->setChecked(m_item->fillRule);
 	clipGroups->setChecked(m_item->groupClipping());
 
-	if ((m_item->isGroup()) && (!m_item->isSingleSel))
-	{
+	if (((m_item->isGroup()) && (!m_item->isSingleSel)) || m_item->asSymbolFrame())
 		setEnabled(true);
-		if (m_item->FrameType == 0)
-			customShape->setIcon(customShape->getIconPixmap(0));
-		if (m_item->FrameType == 1)
-			customShape->setIcon(customShape->getIconPixmap(1));
-		if (m_item->FrameType > 3)
-			customShape->setIcon(customShape->getIconPixmap(m_item->FrameType-2));
-		transPalWidget->updateFromItem();
-		transPalWidget->setActPattern(m_item->patternMask(), patternScaleX, patternScaleY, patternOffsetX, patternOffsetY, patternRotation, patternSkewX, patternSkewY, mirrorX, mirrorY);
-		customShape->setEnabled(true);
-		editShape->setEnabled(true);
-		shapeGroup->setEnabled(true);
-		textFlowDisabled->setEnabled(true);
-		textFlowUsesFrameShape->setEnabled(true);
-		textFlowUsesBoundingBox->setEnabled(true);
-		textFlowUsesContourLine->setEnabled(true);
-		textFlowUsesImageClipping->setEnabled(false);
-	}
 	else
-	{
 		setEnabled(false);
-	}
 
 	m_haveItem = true;
-
-	if (m_item->asOSGFrame())
-	{
-		setEnabled(false);
-	}
-	if (m_item->asSymbolFrame())
-	{
-		setEnabled(true);
-		if (m_item->FrameType == 0)
-			customShape->setIcon(customShape->getIconPixmap(0));
-		if (m_item->FrameType == 1)
-			customShape->setIcon(customShape->getIconPixmap(1));
-		if (m_item->FrameType > 3)
-			customShape->setIcon(customShape->getIconPixmap(m_item->FrameType-2));
-		transPalWidget->updateFromItem();
-		transPalWidget->setActPattern(m_item->patternMask(), patternScaleX, patternScaleY, patternOffsetX, patternOffsetY, patternRotation, patternSkewX, patternSkewY, mirrorX, mirrorY);
-		customShape->setEnabled(true);
-		editShape->setEnabled(true);
-		shapeGroup->setEnabled(true);
-		textFlowDisabled->setEnabled(true);
-		textFlowUsesFrameShape->setEnabled(true);
-		textFlowUsesBoundingBox->setEnabled(true);
-		textFlowUsesContourLine->setEnabled(true);
-		textFlowUsesImageClipping->setEnabled(false);
-	}
-	showTextFlowMode(m_item->textFlowMode());
-}
-
-void PropertiesPalette_Group::showTextFlowMode(PageItem::TextFlowMode mode)
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning() || !m_haveItem)
-		return;
-	if (!m_item->isGroup())
-		return;
-	if (mode == PageItem::TextFlowDisabled)
-		textFlowDisabled->setChecked(true);
-	else if (mode == PageItem::TextFlowUsesFrameShape)
-		textFlowUsesFrameShape->setChecked(true);
-	else if (mode == PageItem::TextFlowUsesBoundingBox)
-		textFlowUsesBoundingBox->setChecked(true);
-	else if (mode == PageItem::TextFlowUsesContourLine)
-		textFlowUsesContourLine->setChecked(true);
-	else if (mode == PageItem::TextFlowUsesImageClipping)
-		textFlowUsesImageClipping->setChecked(true);
-	if ((m_item->asImageFrame()) && (!m_item->imageClip.empty()))
-		textFlowUsesImageClipping->setEnabled(true);
-	else
-		textFlowUsesImageClipping->setEnabled(false);
-}
-
-void PropertiesPalette_Group::updateColorList()
-{
-	if (!m_haveDoc || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	transPalWidget->updateColorList();
-}
-
-void PropertiesPalette_Group::updateColorSpecialGradient()
-{
-	if (!m_haveDoc)
-		return;
-	if(m_doc->m_Selection->isEmpty())
-		return;
-	PageItem *currItem = m_doc->m_Selection->itemAt(0);
-	if (currItem)
-	{
-		switch (m_ScMW->view->editStrokeGradient)
-		{
-		case 0:
-		case 1:
-		case 3:
-		case 4:
-		case 5:
-		case 6:
-		case 7:
-			break;
-		default:
-			if (currItem->isGroup())
-				transPalWidget->setSpecialGradient(currItem->GrMaskStartX, currItem->GrMaskStartY, currItem->GrMaskEndX, currItem->GrMaskEndY, currItem->GrMaskFocalX, currItem->GrMaskFocalY, currItem->GrMaskScale, currItem->GrMaskSkew);
-		}
-	}
-}
-
-void PropertiesPalette_Group::handleGradientChanged()
-{
-	if (m_haveDoc)
-	{
-		VGradient vg(transPalWidget->gradEdit->gradient());
-		m_doc->itemSelection_SetMaskGradient(vg);
-	}
-}
-
-void PropertiesPalette_Group::handleGroupTransparency(double trans)
-{
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		m_item->setFillTransparency(trans);
-		m_item->update();
-	}
-}
-
-void PropertiesPalette_Group::handleGroupBlending(int blend)
-{
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		m_item->setFillBlendmode(blend);
-		m_item->update();
-	}
-}
-
-void PropertiesPalette_Group::handleGroupGradMask(int typ)
-{
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		m_item->GrMask = typ;
-		if ((typ > 0) && (typ < 7))
-			m_item->updateGradientVectors();
-		m_item->update();
-	}
-}
-
-void PropertiesPalette_Group::handleGroupPatternMask(const QString& pattern)
-{
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		m_item->setPatternMask(pattern);
-		m_item->update();
-	}
-}
-
-void PropertiesPalette_Group::handleGroupPatternMaskProps(double imageScaleX, double imageScaleY, double offsetX, double offsetY, double rotation, double skewX, double skewY, bool mirrorX, bool mirrorY)
-{
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		m_item->setMaskTransform(imageScaleX, imageScaleY, offsetX, offsetY, rotation, skewX, skewY);
-		m_item->setMaskFlip(mirrorX, mirrorY);
-		m_item->update();
-	}
-}
-
-void PropertiesPalette_Group::handleNewShape(int frameType, int count, qreal *points)
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		if ((m_item->itemType() == PageItem::PolyLine) || (m_item->itemType() == PageItem::PathText))
-			return;
-
-		m_doc->item_setFrameShape(m_item, frameType, count, points);
-		m_doc->invalidateAll();
-		m_doc->regionsChanged()->update(QRect());
-
-		//ScribusDoc::changed() is called in item_setFrameShape()
-		//Hope this is enough
-		//emit DocChanged();
-		emit shapeChanged(frameType);
-	}
-}
-
-void PropertiesPalette_Group::handleTextFlow()
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		PageItem::TextFlowMode mode = PageItem::TextFlowDisabled;
-		if (m_item->isGroup())
-		{
-			if (textFlowDisabled->isChecked())
-				mode = PageItem::TextFlowDisabled;
-			if (textFlowUsesFrameShape->isChecked())
-				mode = PageItem::TextFlowUsesFrameShape;
-			if (textFlowUsesBoundingBox->isChecked())
-				mode = PageItem::TextFlowUsesBoundingBox;
-			if (textFlowUsesContourLine->isChecked())
-				mode = PageItem::TextFlowUsesContourLine;
-			if (textFlowUsesImageClipping->isChecked())
-				mode = PageItem::TextFlowUsesImageClipping;
-		}
-		m_item->setTextFlowMode(mode);
-		m_doc->changed();
-		m_doc->invalidateAll();
-		m_doc->regionsChanged()->update(QRect());
-	}
-}
-
-void PropertiesPalette_Group::handleGradientEdit()
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		m_ScMW->view->editStrokeGradient = 2;
-		if (transPalWidget->gradEditButton->isChecked())
-			m_ScMW->view->requestMode(modeEditGradientVectors);
-		else
-			m_ScMW->view->requestMode(modeNormal);
-	}
-}
-
-void PropertiesPalette_Group::handleSpecialGradient(double x1, double y1, double x2, double y2, double fx, double fy, double sg, double sk)
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		QRectF upRect;
-		m_item->GrMaskStartX = x1 / m_unitRatio;
-		m_item->GrMaskStartY = y1 / m_unitRatio;
-		m_item->GrMaskEndX = x2 / m_unitRatio;
-		m_item->GrMaskEndY = y2 / m_unitRatio;
-		m_item->GrMaskFocalX = fx / m_unitRatio;
-		m_item->GrMaskFocalY = fy / m_unitRatio;
-		m_item->GrMaskScale = sg;
-		m_item->GrMaskSkew = sk;
-		if ((m_item->GrMask == 1) || (m_item->GrMask == 4))
-		{
-			m_item->GrMaskFocalX = m_item->GrMaskStartX;
-			m_item->GrMaskFocalY = m_item->GrMaskStartY;
-		}
-		m_item->update();
-		upRect = QRectF(QPointF(m_item->GrMaskStartX, m_item->GrMaskStartY), QPointF(m_item->GrMaskEndX, m_item->GrMaskEndY));
-		double radEnd = distance(m_item->GrMaskEndX - m_item->GrMaskStartX, m_item->GrMaskEndY - m_item->GrMaskStartY);
-		double rotEnd = xy2Deg(m_item->GrMaskEndX - m_item->GrMaskStartX, m_item->GrMaskEndY - m_item->GrMaskStartY);
-		QTransform m;
-		m.translate(m_item->GrMaskStartX, m_item->GrMaskStartY);
-		m.rotate(rotEnd);
-		m.rotate(-90);
-		m.rotate(m_item->GrMaskSkew);
-		m.translate(radEnd * m_item->GrMaskScale, 0);
-		QPointF shP = m.map(QPointF(0,0));
-		upRect |= QRectF(shP, QPointF(m_item->GrMaskEndX, m_item->GrMaskEndY)).normalized();
-		upRect |= QRectF(shP, QPointF(m_item->GrMaskStartX, m_item->GrMaskStartY)).normalized();
-		upRect |= QRectF(shP, QPointF(0, 0)).normalized();
-		upRect |= QRectF(shP, QPointF(m_item->width(), m_item->height())).normalized();
-		upRect.translate(m_item->xPos(), m_item->yPos());
-		m_doc->regionsChanged()->update(upRect.adjusted(-10.0, -10.0, 10.0, 10.0));
-		m_doc->changed();
-	}
-}
-
-void PropertiesPalette_Group::handleFillRule()
-{
-	if (!m_haveDoc || !m_haveItem || !m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	m_item->fillRule = evenOdd->isChecked();
-	m_item->update();
 }
 
 void PropertiesPalette_Group::handleClipping()
@@ -580,42 +221,6 @@ void PropertiesPalette_Group::handleClipping()
 	m_item->update();
 }
 
-void PropertiesPalette_Group::handleShapeEdit()
-{
-	if (!m_ScMW || m_ScMW->scriptIsRunning())
-		return;
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		m_tmpSelection->clear();
-		m_tmpSelection->copy(*m_doc->m_Selection, true);
-		m_doc->m_Selection->clear();
-		m_doc->m_Selection->addItem(m_item);
-		m_item->isSingleSel = true;
-		m_item->update();
-		m_ScMW->view->requestMode(modeEditClip);
-		m_ScMW->scrActions["itemUngroup"]->setEnabled(false);
-		connect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded()));
-		emit shapeEditStarted();
-	}
-}
-
-void PropertiesPalette_Group::handleShapeEditEnded()
-{
-	disconnect(m_ScMW->nodePalette, SIGNAL(paletteClosed()), this, SLOT(handleShapeEditEnded()));
-	if ((m_haveDoc) && (m_haveItem))
-	{
-		if (m_tmpSelection->count() > 0)
-		{
-			m_doc->m_Selection->copy(*m_tmpSelection, false);
-			m_doc->m_Selection->connectItemToGUI();
-		}
-		m_tmpSelection->clear();
-//		m_ScMW->propertiesPalette->setCurrentItem(m_doc->m_Selection->itemAt(0));
-//		m_ScMW->scrActions["itemGroup"]->setEnabled(true);
-//		m_ScMW->propertiesPalette->xyzPal->doUnGroup->setEnabled(true);
-	}
-}
-
 void PropertiesPalette_Group::changeEvent(QEvent *e)
 {
 	if (e->type() == QEvent::LanguageChange)
@@ -637,11 +242,6 @@ void PropertiesPalette_Group::unitChange()
 	if (!m_doc)
 		return;
 
-	double oldRatio = m_unitRatio;
 	m_unitRatio = m_doc->unitRatio();
 	m_unitIndex = m_doc->unitIndex();
-
-	transPalWidget->blockSignals(true);
-	transPalWidget->unitChange(oldRatio, m_unitRatio, m_doc->unitIndex());
-	transPalWidget->blockSignals(false);
 }
diff --git a/scribus/ui/propertiespalette_group.h b/scribus/ui/propertiespalette_group.h
index c55bc6b6f..f843706cc 100644
--- a/scribus/ui/propertiespalette_group.h
+++ b/scribus/ui/propertiespalette_group.h
@@ -36,7 +36,6 @@ protected:
 
 	bool      m_haveDoc;
 	bool      m_haveItem;
-	bool      m_userActionOn;
 	double    m_unitRatio;
 	int       m_unitIndex;
 
@@ -64,28 +63,7 @@ public slots:
 	void unitChange();
 
 private slots:
-
-	void handleGradientChanged();
-	void handleGroupTransparency(double trans);
-	void handleGroupBlending(int blend);
-	void handleGroupGradMask(int typ);
-	void handleGroupPatternMask(const QString& pattern);
-	void handleGroupPatternMaskProps(double, double, double, double, double, double, double, bool, bool);
-
-	void handleTextFlow();
-	void handleNewShape(int f, int c, qreal *vals);
-
-	void handleFillRule();
 	void handleClipping();
-	void handleShapeEdit();
-	void handleShapeEditEnded();
-
-	void handleSpecialGradient(double, double, double, double, double, double, double, double );
-	void handleGradientEdit();
-
-signals:
-	void shapeChanged(int);
-	void shapeEditStarted();
 };
 
 #endif
diff --git a/scribus/ui/propertiespalette_groupbase.ui b/scribus/ui/propertiespalette_groupbase.ui
index 26a0ec4cd..b025967a3 100644
--- a/scribus/ui/propertiespalette_groupbase.ui
+++ b/scribus/ui/propertiespalette_groupbase.ui
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>212</width>
-    <height>387</height>
+    <height>47</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -29,316 +29,6 @@
    <property name="bottomMargin">
     <number>3</number>
    </property>
-   <item>
-    <widget class="QGroupBox" name="shapeGroup">
-     <property name="title">
-      <string>Shape</string>
-     </property>
-     <property name="flat">
-      <bool>true</bool>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_2">
-      <property name="spacing">
-       <number>5</number>
-      </property>
-      <property name="leftMargin">
-       <number>2</number>
-      </property>
-      <property name="topMargin">
-       <number>2</number>
-      </property>
-      <property name="rightMargin">
-       <number>2</number>
-      </property>
-      <property name="bottomMargin">
-       <number>2</number>
-      </property>
-      <item>
-       <layout class="QHBoxLayout" name="horizontalLayout">
-        <item>
-         <spacer name="horizontalSpacer">
-          <property name="orientation">
-           <enum>Qt::Horizontal</enum>
-          </property>
-          <property name="sizeHint" stdset="0">
-           <size>
-            <width>40</width>
-            <height>20</height>
-           </size>
-          </property>
-         </spacer>
-        </item>
-        <item>
-         <widget class="Autoforms" name="customShape">
-          <property name="text">
-           <string>...</string>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QToolButton" name="editShape">
-          <property name="text">
-           <string>&amp;Edit...</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <widget class="QGroupBox" name="textFlowGroup">
-     <property name="title">
-      <string>Text &amp;Flow Around Frame</string>
-     </property>
-     <property name="flat">
-      <bool>true</bool>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout">
-      <property name="spacing">
-       <number>2</number>
-      </property>
-      <property name="leftMargin">
-       <number>2</number>
-      </property>
-      <property name="topMargin">
-       <number>2</number>
-      </property>
-      <property name="rightMargin">
-       <number>2</number>
-      </property>
-      <property name="bottomMargin">
-       <number>2</number>
-      </property>
-      <item>
-       <widget class="QToolButton" name="textFlowDisabled">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="toolTip">
-         <string>Disable text flow from lower frames around object</string>
-        </property>
-        <property name="text">
-         <string>Disabled</string>
-        </property>
-        <property name="checkable">
-         <bool>true</bool>
-        </property>
-        <property name="autoExclusive">
-         <bool>true</bool>
-        </property>
-        <property name="toolButtonStyle">
-         <enum>Qt::ToolButtonTextBesideIcon</enum>
-        </property>
-        <attribute name="buttonGroup">
-         <string notr="true">textFlowBtnGroup</string>
-        </attribute>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="textFlowUsesFrameShape">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="toolTip">
-         <string>Use the frame shape for text flow of text frames below the object</string>
-        </property>
-        <property name="text">
-         <string>Use Frame &amp;Shape</string>
-        </property>
-        <property name="checkable">
-         <bool>true</bool>
-        </property>
-        <property name="autoExclusive">
-         <bool>true</bool>
-        </property>
-        <property name="toolButtonStyle">
-         <enum>Qt::ToolButtonTextBesideIcon</enum>
-        </property>
-        <attribute name="buttonGroup">
-         <string notr="true">textFlowBtnGroup</string>
-        </attribute>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="textFlowUsesBoundingBox">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="toolTip">
-         <string>&lt;qt&gt;Use the bounding box, which is always rectangular, instead of the frame's shape for text flow of text frames below the object&lt;/qt&gt;</string>
-        </property>
-        <property name="text">
-         <string>Use &amp;Bounding Box</string>
-        </property>
-        <property name="checkable">
-         <bool>true</bool>
-        </property>
-        <property name="autoExclusive">
-         <bool>true</bool>
-        </property>
-        <property name="toolButtonStyle">
-         <enum>Qt::ToolButtonTextBesideIcon</enum>
-        </property>
-        <attribute name="buttonGroup">
-         <string notr="true">textFlowBtnGroup</string>
-        </attribute>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="textFlowUsesContourLine">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="toolTip">
-         <string>&lt;qt&gt;When chosen, the contour line can be edited with the Edit Shape Tool on the palette further above. When edited via the shape palette, this becomes a second separate line originally based on the frame's shape for text flow of text frames below the object.&lt;/qt&gt;</string>
-        </property>
-        <property name="text">
-         <string>&amp;Use Contour Line</string>
-        </property>
-        <property name="checkable">
-         <bool>true</bool>
-        </property>
-        <property name="autoExclusive">
-         <bool>true</bool>
-        </property>
-        <property name="toolButtonStyle">
-         <enum>Qt::ToolButtonTextBesideIcon</enum>
-        </property>
-        <attribute name="buttonGroup">
-         <string notr="true">textFlowBtnGroup</string>
-        </attribute>
-       </widget>
-      </item>
-      <item>
-       <widget class="QToolButton" name="textFlowUsesImageClipping">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="toolTip">
-         <string>&lt;qt&gt;Use the clipping path of the image&lt;/qt&gt;</string>
-        </property>
-        <property name="text">
-         <string>Use Image Clip Path</string>
-        </property>
-        <property name="checkable">
-         <bool>true</bool>
-        </property>
-        <property name="autoExclusive">
-         <bool>true</bool>
-        </property>
-        <property name="toolButtonStyle">
-         <enum>Qt::ToolButtonTextBesideIcon</enum>
-        </property>
-        <attribute name="buttonGroup">
-         <string notr="true">textFlowBtnGroup</string>
-        </attribute>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <widget class="QGroupBox" name="fillRuleGroup">
-     <property name="title">
-      <string>Fill Rule</string>
-     </property>
-     <property name="flat">
-      <bool>true</bool>
-     </property>
-     <layout class="QHBoxLayout" name="horizontalLayout_3">
-      <property name="spacing">
-       <number>5</number>
-      </property>
-      <property name="leftMargin">
-       <number>2</number>
-      </property>
-      <property name="topMargin">
-       <number>2</number>
-      </property>
-      <property name="rightMargin">
-       <number>2</number>
-      </property>
-      <property name="bottomMargin">
-       <number>2</number>
-      </property>
-      <item>
-       <spacer name="horizontalSpacer_2">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>10</width>
-          <height>10</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-      <item>
-       <widget class="QRadioButton" name="evenOdd">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="toolTip">
-         <string>&lt;qt&gt;Any path self-intersections or subpaths create holes in the fill&lt;/qt&gt;</string>
-        </property>
-        <property name="text">
-         <string>Even-Odd</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <widget class="QRadioButton" name="nonZero">
-        <property name="sizePolicy">
-         <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="toolTip">
-         <string>&lt;qt&gt;Fill is solid unless a subpath is counter-directional&lt;/qt&gt;</string>
-        </property>
-        <property name="text">
-         <string>Non Zero</string>
-        </property>
-       </widget>
-      </item>
-      <item>
-       <spacer name="horizontalSpacer_3">
-        <property name="orientation">
-         <enum>Qt::Horizontal</enum>
-        </property>
-        <property name="sizeHint" stdset="0">
-         <size>
-          <width>10</width>
-          <height>10</height>
-         </size>
-        </property>
-       </spacer>
-      </item>
-     </layout>
-    </widget>
-   </item>
    <item>
     <widget class="QCheckBox" name="clipGroups">
      <property name="toolTip">
@@ -349,36 +39,6 @@
      </property>
     </widget>
    </item>
-   <item>
-    <widget class="QGroupBox" name="transparencyGroup">
-     <property name="title">
-      <string>Transparency</string>
-     </property>
-     <property name="flat">
-      <bool>true</bool>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_4">
-      <property name="spacing">
-       <number>2</number>
-      </property>
-      <property name="leftMargin">
-       <number>2</number>
-      </property>
-      <property name="topMargin">
-       <number>2</number>
-      </property>
-      <property name="rightMargin">
-       <number>2</number>
-      </property>
-      <property name="bottomMargin">
-       <number>2</number>
-      </property>
-      <item>
-       <widget class="TransparencyPalette" name="transPalWidget" native="true"/>
-      </item>
-     </layout>
-    </widget>
-   </item>
    <item>
     <spacer name="verticalSpacer">
      <property name="orientation">
@@ -394,19 +54,6 @@
    </item>
   </layout>
  </widget>
- <customwidgets>
-  <customwidget>
-   <class>Autoforms</class>
-   <extends>QToolButton</extends>
-   <header>ui/autoform.h</header>
-  </customwidget>
-  <customwidget>
-   <class>Tpalette</class>
-   <extends>QWidget</extends>
-   <header>ui/transparencypalette.h</header>
-   <container>1</container>
-  </customwidget>
- </customwidgets>
  <resources/>
  <connections/>
  <buttongroups>
diff --git a/scribus/ui/propertiespalette_shape.cpp b/scribus/ui/propertiespalette_shape.cpp
index 1c5df1cc7..8ede73313 100644
--- a/scribus/ui/propertiespalette_shape.cpp
+++ b/scribus/ui/propertiespalette_shape.cpp
@@ -405,19 +405,16 @@ void PropertiesPalette_Shape::handleTextFlow()
 		return;
 	if ((m_haveDoc) && (m_haveItem))
 	{
-		if (!m_item->isGroup())
-		{
-			if (textFlowDisabled->isChecked())
-				mode = PageItem::TextFlowDisabled;
-			if (textFlowUsesFrameShape->isChecked())
-				mode = PageItem::TextFlowUsesFrameShape;
-			if (textFlowUsesBoundingBox->isChecked())
-				mode = PageItem::TextFlowUsesBoundingBox;
-			if (textFlowUsesContourLine->isChecked())
-				mode = PageItem::TextFlowUsesContourLine;
-			if (textFlowUsesImageClipping->isChecked())
-				mode = PageItem::TextFlowUsesImageClipping;
-		}
+		if (textFlowDisabled->isChecked())
+			mode = PageItem::TextFlowDisabled;
+		if (textFlowUsesFrameShape->isChecked())
+			mode = PageItem::TextFlowUsesFrameShape;
+		if (textFlowUsesBoundingBox->isChecked())
+			mode = PageItem::TextFlowUsesBoundingBox;
+		if (textFlowUsesContourLine->isChecked())
+			mode = PageItem::TextFlowUsesContourLine;
+		if (textFlowUsesImageClipping->isChecked())
+			mode = PageItem::TextFlowUsesImageClipping;
 		m_item->setTextFlowMode(mode);
 		m_doc->changed();
 		m_doc->invalidateAll();
@@ -517,8 +514,6 @@ void PropertiesPalette_Shape::showTextFlowMode(PageItem::TextFlowMode mode)
 {
 	if (!m_ScMW || m_ScMW->scriptIsRunning() || !m_haveItem)
 		return;
-	if (m_item->isGroup())
-		return;
 	if (mode == PageItem::TextFlowDisabled)
 		textFlowDisabled->setChecked(true);
 	else if (mode == PageItem::TextFlowUsesFrameShape)
diff --git a/scribus/ui/transparencypalette.cpp b/scribus/ui/transparencypalette.cpp
index da5779ff2..362b07a3a 100644
--- a/scribus/ui/transparencypalette.cpp
+++ b/scribus/ui/transparencypalette.cpp
@@ -92,6 +92,11 @@ void TransparencyPalette::setCurrentItem(PageItem* item)
 	if (!currentItem || !currentDoc)
 		return;
 
+	if (currentItem->isGroup())
+		hideSelectionButtons();
+	else
+		showSelectionButtons();
+
 	setActTrans(currentItem->fillTransparency(), currentItem->lineTransparency());
 	setActBlend(currentItem->fillBlendmode(), currentItem->lineBlendmode());
 	gradEdit->setGradient(currentItem->mask_gradient);
@@ -196,12 +201,21 @@ void TransparencyPalette::updateColorList()
 		setCurrentItem(currentItem);
 }
 
+void TransparencyPalette::showSelectionButtons()
+{
+	editLineSelector->show();
+	editLineSelector->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+	editFillSelector->show();
+	editFillSelector->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+}
 void TransparencyPalette::hideSelectionButtons()
 {
 	editLineSelector->hide();
 	editLineSelector->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored));
 	editFillSelector->hide();
 	editFillSelector->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored));
+	stackedWidget->setCurrentIndex(1);
+	editFillSelector->setChecked(true);
 }
 
 void TransparencyPalette::updateFromItem()
diff --git a/scribus/ui/transparencypalette.h b/scribus/ui/transparencypalette.h
index 8dcbfb9c0..da1d7288b 100644
--- a/scribus/ui/transparencypalette.h
+++ b/scribus/ui/transparencypalette.h
@@ -61,6 +61,7 @@ public:
 
 	void setDocument(ScribusDoc* doc);
 	void setCurrentItem(PageItem* item);
+	void showSelectionButtons();
 	void hideSelectionButtons();
 	void updateFromItem();
 
indigo-pp-group.diff (40,439 bytes)

ale

2019-11-05 07:33

manager   ~0046966

as far as i can tell, this has been committed...

Issue History

Date Modified Username Field Change
2019-09-07 07:28 ale New Issue
2019-09-10 10:21 ale Summary Properties palette: why is there a Group tab? => [PATCH] Properties palette: why is there a Group tab?
2019-09-10 10:21 ale Patch No => Yes
2019-09-10 11:58 ale File Added: indigo-pp-group.diff
2019-09-10 11:58 ale Note Added: 0046652
2019-09-10 11:58 ale Tag Attached: patch
2019-09-10 13:53 ale Note Edited: 0046652 View Revisions
2019-11-05 07:31 ale Summary [PATCH] Properties palette: why is there a Group tab? => [PATCH] Indigo UI: Properties palette: why is there a Group tab?
2019-11-05 07:33 ale Assigned To => ale
2019-11-05 07:33 ale Status new => closed
2019-11-05 07:33 ale Resolution open => fixed
2019-11-05 07:33 ale Note Added: 0046966
2019-11-05 07:40 ale Fixed in Version => 1.5.6.svn