View Issue Details

IDProjectCategoryView StatusLast Update
0011551ScribusTablespublic2023-05-25 19:35
Reporterchristoph_s Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platformx86_64OSLinuxOS VersionOpenSUSE 12.1
Product Version1.5.0svn 
Target Version1.6 milestone 
Summary0011551: Table/cell indication is clumsy
DescriptionTables on canvas look clumsy -- almost as in old-fashioned HTML tables with 3 (!) lines being drawn, one for the table border, one for the cell border, and in between the actual border stroke. This doesn't help with design at all.

IMHO, there's no need to separate this triple display at all. If there is a selected line setting for a table/cell, it would be enough. If there is no line colour for tables/cells a grey colour as an object indicator will do, and selected cells could use red, just like any other selected item.
TagsNo tags attached.
PatchNo

Activities

nitramr

2023-05-25 19:35

developer   ~0050190

I made a patch to avoid drawing the text frame border inside the table cell.
table_cell_border.patch (2,327 bytes)   
Index: scribus/pageitem_textframe.cpp
===================================================================
--- scribus/pageitem_textframe.cpp	(Revision 25460)
+++ scribus/pageitem_textframe.cpp	(Arbeitskopie)
@@ -3669,7 +3669,7 @@
 	if ((!isEmbedded) && (!m_Doc->RePos))
 	{
 		double scpInv = 0.0;
-		if ((drawFrame()) && (m_Doc->guidesPrefs().framesShown) && (no_stroke))
+		if ((drawFrame()) && (m_Doc->guidesPrefs().framesShown) && (no_stroke) && !isTableCellTextFrame())
 		{
 			p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			if ((isBookmark) || (m_isAnnotation))
@@ -3713,7 +3713,7 @@
 			double ofy = m_height - ofwh*3;
 			p->drawSharpRect(ofx, ofy, ofwh, ofwh);
 		}
-		if (no_fill && no_stroke && m_Doc->guidesPrefs().framesShown)
+		if (no_fill && no_stroke && m_Doc->guidesPrefs().framesShown && !m_isTableCellTextFrame)
 		{
 			p->setPen(PrefsManager::instance().appPrefs.displayPrefs.frameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			if (m_Locked)
Index: scribus/pageitem_textframe.h
===================================================================
--- scribus/pageitem_textframe.h	(Revision 25460)
+++ scribus/pageitem_textframe.h	(Arbeitskopie)
@@ -57,6 +57,8 @@
 	const PageItem_TextFrame * asTextFrame() const override { return this; }
 	bool isTextFrame() const override { return true; }
 	bool isTextContainer() const override { return true; }
+	bool isTableCellTextFrame() { return m_isTableCellTextFrame; }
+	void setIsTableCellTextFrame(bool isTableCellTextFrame){ m_isTableCellTextFrame = isTableCellTextFrame; }
 
 	void clearContents() override;
 	void truncateContents() override;
@@ -124,6 +126,8 @@
 	QRectF m_origAnnotPos;
 	void updateBulletsNum();
 
+	bool m_isTableCellTextFrame = false;
+
 private slots:
 	void slotInvalidateLayout(int firstItem, int endItem);
 
Index: scribus/tablecell.cpp
===================================================================
--- scribus/tablecell.cpp	(Revision 25460)
+++ scribus/tablecell.cpp	(Arbeitskopie)
@@ -35,6 +35,7 @@
 	d->textFrame->OwnPage = table->OwnPage;
 	d->textFrame->OnMasterPage = table->OnMasterPage;
 	d->textFrame->m_layerID = table->m_layerID;
+	d->textFrame->setIsTableCellTextFrame(true);
 
 	setValid(true);
 	setRow(row);
table_cell_border.patch (2,327 bytes)   

Issue History

Date Modified Username Field Change
2013-05-28 05:56 christoph_s New Issue
2014-07-02 12:55 Kunda Target Version 1.5.0 => 1.6 milestone
2016-05-29 03:26 Kunda Patch => No
2016-05-29 03:26 Kunda Category Canvas => Tables
2023-05-25 19:35 nitramr Note Added: 0050190
2023-05-25 19:35 nitramr File Added: table_cell_border.patch