r21353 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Wed May 25 11:34:44 UTC 2016


Author: jghali
Date: Wed May 25 11:34:44 2016
New Revision: 21353

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21353
Log:
#14094: fix text selection drawing artifacts when using underline effects

Modified:
    trunk/Scribus/scribus/text/screenpainter.cpp

Modified: trunk/Scribus/scribus/text/screenpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21353&path=/trunk/Scribus/scribus/text/screenpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/text/screenpainter.cpp	(original)
+++ trunk/Scribus/scribus/text/screenpainter.cpp	Wed May 25 11:34:44 2016
@@ -308,18 +308,19 @@
 
 void ScreenPainter::setupState(bool rect)
 {
-	m_painter->setLineWidth(strokeWidth());
 	if (selected() && rect)
 	{
 		// we are drawing a selection rect
-		m_painter->setBrush(qApp->palette().color(QPalette::Active, QPalette::Highlight));
-		m_painter->setPen(qApp->palette().color(QPalette::Active, QPalette::Highlight));
+		QColor color = qApp->palette().color(QPalette::Active, QPalette::Highlight);
+		m_painter->setBrush(color);
+		m_painter->setPen(color, strokeWidth(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	}
 	else if (selected())
 	{
 		// we are drawing selected text
-		m_painter->setBrush(qApp->palette().color(QPalette::Active, QPalette::HighlightedText));
-		m_painter->setPen(qApp->palette().color(QPalette::Active, QPalette::HighlightedText));
+		QColor color = qApp->palette().color(QPalette::Active, QPalette::HighlightedText);
+		m_painter->setBrush(color);
+		m_painter->setPen(color, strokeWidth(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 	}
 	else
 	{




More information about the scribus-commit mailing list