r18159 by jghali - #11388: Unselected frame outline no longer visible after upgrade to 1.4.2
scribus-commit
scribus-commit at lists.scribus.net
Sun Feb 24 13:57:04 UTC 2013
Author: jghali
Date: Sun Feb 24 13:57:03 2013
New Revision: 18159
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18159
Log:
#11388: Unselected frame outline no longer visible after upgrade to 1.4.2
Modified:
branches/Version14x/Scribus/scribus/pageitem.cpp
branches/Version14x/Scribus/scribus/pageitem_textframe.cpp
Modified: branches/Version14x/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18159&path=/branches/Version14x/Scribus/scribus/pageitem.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pageitem.cpp (original)
+++ branches/Version14x/Scribus/scribus/pageitem.cpp Sun Feb 24 13:57:03 2013
@@ -1271,8 +1271,8 @@
}
if ((!isEmbedded) && (!m_Doc->RePos))
{
- double aestheticFactor(5.0);
- double scpInv = 1.0 / (qMax(view->scale(), 1.0) * aestheticFactor);
+ double aestheticFactor(3.33);
+ double scpInv = 1.0 / (view->scale() * aestheticFactor);
if (!isGroupControl)
{
if ((Frame) && (m_Doc->guidesSettings.framesShown) && ((itemType() == ImageFrame) || (itemType() == LatexFrame) || (itemType() == PathText)))
@@ -1320,7 +1320,7 @@
}
if ((m_Doc->guidesSettings.framesShown) && textFlowUsesContourLine() && (ContourLine.size() != 0))
{
- p->setPen(Qt::darkGray, 1.0 / qMax(view->scale(), 1.0), Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(Qt::darkGray, scpInv, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
// Ugly Hack to fix rendering problems with cairo >=1.5.10 && <1.8.0 follows
#ifdef HAVE_CAIRO
#if ((CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 5, 10)) && (CAIRO_VERSION < CAIRO_VERSION_ENCODE(1, 8, 0)))
@@ -1335,7 +1335,7 @@
}
if ((m_Doc->guidesSettings.layerMarkersShown) && (m_Doc->layerCount() > 1) && (!m_Doc->layerOutline(LayerNr)) && ((isGroupControl) || (Groups.count() == 0)) && (!view->m_canvas->isPreviewMode()))
{
- p->setPen(Qt::black, 0.5/ m_Doc->view()->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(Qt::black, 0.5 / m_Doc->view()->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
p->setPenOpacity(1.0);
p->setBrush(m_Doc->layerMarker(LayerNr));
p->setBrushOpacity(1.0);
Modified: branches/Version14x/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18159&path=/branches/Version14x/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/pageitem_textframe.cpp (original)
+++ branches/Version14x/Scribus/scribus/pageitem_textframe.cpp Sun Feb 24 13:57:03 2013
@@ -2874,8 +2874,8 @@
if ((!isEmbedded) && (!m_Doc->RePos))
{
// added to prevent fat frame outline due to antialiasing and considering you canât pass a cosmetic pen to scpainter - pm
- double aestheticFactor(5.0);
- double scpInv = 1.0 / (qMax(view->scale(), 1.0) * aestheticFactor);
+ double aestheticFactor(3.33);
+ double scpInv = 1.0 / (view->scale() * aestheticFactor);
if ((Frame) && (m_Doc->guidesSettings.framesShown))
{
p->setPen(PrefsManager::instance()->appPrefs.DFrameNormColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
@@ -2925,7 +2925,7 @@
drawColumnBorders(p);
if ((m_Doc->guidesSettings.layerMarkersShown) && (m_Doc->layerCount() > 1) && (!m_Doc->layerOutline(LayerNr)) && (!view->m_canvas->isPreviewMode()))
{
- p->setPen(Qt::black, 0.5/ m_Doc->view()->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ p->setPen(Qt::black, 0.5 / m_Doc->view()->scale(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
p->setPenOpacity(1.0);
p->setBrush(m_Doc->layerMarker(LayerNr));
p->setBrushOpacity(1.0);
@@ -3014,7 +3014,7 @@
//<< ISO 14755
//Check if we are trying to enter Unicode sequence mode first
QKeySequence currKeySeq = QKeySequence(k->key() | keyModifiers);
- if(currKeySeq.matches(doc()->scMW()->scrActions["specialUnicodeSequenceBegin"]->shortcut())==QKeySequence::ExactMatch)
+ if (currKeySeq.matches(doc()->scMW()->scrActions["specialUnicodeSequenceBegin"]->shortcut())==QKeySequence::ExactMatch)
{
unicodeTextEditMode = true;
unicodeInputCount = 0;
@@ -3133,9 +3133,9 @@
case Qt::Key_End:
// go to end of line
len = lastInFrame();
- if ( itemText.cursorPosition() >= (len + 1) )
+ if (itemText.cursorPosition() >= (len + 1))
break; // at end of frame
- if ( (buttonModifiers & Qt::ControlModifier) == 0 )
+ if ((buttonModifiers & Qt::ControlModifier) == 0)
{
itemText.setCursorPosition( itemText.endOfLine(itemText.cursorPosition()) );
}
@@ -3144,9 +3144,9 @@
//Control End for end of frame text
itemText.setCursorPosition( itemText.endOfFrame(itemText.cursorPosition()) );
}
- if ( buttonModifiers & Qt::ShiftModifier )
+ if (buttonModifiers & Qt::ShiftModifier)
ExpandSel(1, oldPos);
-// if ( this->itemText.lengthOfSelection() > 0 )
+// if (this->itemText.lengthOfSelection() > 0)
// view->RefreshItem(this);
m_Doc->scMW()->setTBvals(this);
break;
@@ -3205,7 +3205,7 @@
break; // at begin of frame
len = itemText.length();
itemText.setCursorPosition( itemText.prevParagraph(itemText.cursorPosition()) );
- if ( buttonModifiers & Qt::ShiftModifier )
+ if (buttonModifiers & Qt::ShiftModifier)
ExpandSel(-1, oldPos);
}
else
More information about the scribus-commit
mailing list