Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 12475 → Rev 12476

/trunk/Scribus/scribus/prefs.cpp
367,6 → 367,7
prefsManager->appPrefs.scratch.Right = tabView->rightScratch->value() / prefsUnitRatio;
prefsManager->appPrefs.scratch.Top = tabView->topScratch->value() / prefsUnitRatio;
// GUI colors
prefsManager->appPrefs.showPageShadow = tabView->checkShowPageShadow->isChecked();
prefsManager->appPrefs.DpapColor = tabView->colorPaper;
prefsManager->appPrefs.DFrameColor = tabView->colorFrame;
prefsManager->appPrefs.DFrameNormColor = tabView->colorFrameNorm;
/trunk/Scribus/scribus/tabdisplay.cpp
37,6 → 37,7
checkFrame->setToolTip( "<qt>" + tr("Turns the display of frames on or off") + "</qt>");
checkLayerM->setToolTip( "<qt>" + tr("Turns the display of layer indicators on or off") + "</qt>");
checkPictures->setToolTip( "<qt>" + tr("Turns the display of images on or off") + "</qt>");
checkShowPageShadow->setToolTip( "<qt>" + tr("Turns the page shadow on or off") + "</qt>");
leftScratch->setToolTip( "<qt>" + tr( "Defines amount of space left of the document canvas available as a pasteboard for creating and modifying elements and dragging them onto the active page" ) + "</qt>" );
rightScratch->setToolTip( "<qt>" + tr( "Defines amount of space right of the document canvas available as a pasteboard for creating and modifying elements and dragging them onto the active page" ) + "</qt>" );
topScratch->setToolTip( "<qt>" + tr( "Defines amount of space above the document canvas available as a pasteboard for creating and modifying elements and dragging them onto the active page" ) + "</qt>" );
104,7 → 105,7
colorControlChars = prefsData->DControlCharColor;
buttonControlChars->setText( QString::null );
buttonControlChars->setIcon(pm);
 
checkShowPageShadow->setChecked(prefsData->showPageShadow);
checkUnprintable->setChecked( prefsData->marginColored );
checkPictures->setChecked(guidesSettings.showPic);
checkLink->setChecked(guidesSettings.linkShown);
271,6 → 272,7
buttonSelectedPage->hide();
groupObjFrame->hide();
textColorGroup->hide();
checkShowPageShadow->hide();
}
 
void TabDisplay::changeFrameColor()
/trunk/Scribus/scribus/tabdisplay.ui
8,7 → 8,7
<x>0</x>
<y>0</y>
<width>623</width>
<height>439</height>
<height>620</height>
</rect>
</property>
<property name="windowTitle" >
15,24 → 15,12
<string>TabDisplayBase</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>10</number>
</property>
<property name="topMargin" >
<number>10</number>
</property>
<property name="rightMargin" >
<number>10</number>
</property>
<property name="bottomMargin" >
<number>10</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="0" column="0" >
<widget class="QTabWidget" name="displayTabWidget" >
<property name="currentIndex" >
39,6 → 27,14
<number>0</number>
</property>
<widget class="QWidget" name="displayGeneral" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>595</width>
<height>567</height>
</rect>
</property>
<attribute name="title" >
<string>General</string>
</attribute>
49,24 → 45,12
<string>Page Display</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>10</number>
</property>
<property name="topMargin" >
<number>10</number>
</property>
<property name="rightMargin" >
<number>10</number>
</property>
<property name="bottomMargin" >
<number>10</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="7" column="0" >
<widget class="QCheckBox" name="checkBleed" >
<property name="text" >
135,6 → 119,16
</property>
</widget>
</item>
<item row="8" column="0" >
<widget class="QCheckBox" name="checkShowPageShadow" >
<property name="toolTip" >
<string/>
</property>
<property name="text" >
<string>Show Page Shadow</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
144,24 → 138,12
<string>Scratch Space</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>10</number>
</property>
<property name="topMargin" >
<number>10</number>
</property>
<property name="rightMargin" >
<number>10</number>
</property>
<property name="bottomMargin" >
<number>10</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="3" column="1" >
<widget class="ScrSpinBox" name="bottomScratch" />
</item>
242,24 → 224,12
<string>Gaps Between Pages</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>10</number>
</property>
<property name="topMargin" >
<number>10</number>
</property>
<property name="rightMargin" >
<number>10</number>
</property>
<property name="bottomMargin" >
<number>10</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="1" column="1" >
<widget class="ScrSpinBox" name="gapVertical" />
</item>
310,18 → 280,9
<property name="spacing" >
<number>5</number>
</property>
<property name="leftMargin" >
<property name="margin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<widget class="QSlider" name="CaliSlider" >
<property name="minimum" >
393,7 → 354,7
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>581</width>
<height>16</height>
404,28 → 365,24
</layout>
</widget>
<widget class="QWidget" name="displayColors" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>840</width>
<height>420</height>
</rect>
</property>
<attribute name="title" >
<string>Colors</string>
</attribute>
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>10</number>
</property>
<property name="topMargin" >
<number>10</number>
</property>
<property name="rightMargin" >
<number>10</number>
</property>
<property name="bottomMargin" >
<number>10</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="3" column="0" >
<spacer>
<property name="orientation" >
434,7 → 391,7
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>41</width>
<height>31</height>
448,41 → 405,20
<string>Pages:</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>10</number>
</property>
<property name="topMargin" >
<number>10</number>
</property>
<property name="rightMargin" >
<number>10</number>
</property>
<property name="bottomMargin" >
<number>10</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="0" column="2" >
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>5</number>
</property>
<property name="leftMargin" >
<property name="margin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<widget class="QLabel" name="selectedPageBorderLabel" >
<property name="text" >
522,7 → 458,7
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
535,18 → 471,9
<property name="spacing" >
<number>5</number>
</property>
<property name="leftMargin" >
<property name="margin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<item>
<widget class="QLabel" name="textLabel11" >
<property name="text" >
587,44 → 514,20
<string>Frames</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>10</number>
</property>
<property name="topMargin" >
<number>10</number>
</property>
<property name="rightMargin" >
<number>10</number>
</property>
<property name="bottomMargin" >
<number>10</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="0" column="4" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="textLabel3" >
<property name="text" >
693,7 → 596,7
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>16</width>
<height>20</height>
703,24 → 606,12
</item>
<item row="0" column="2" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="0" column="1" >
<widget class="QPushButton" name="buttonFrameSelected" >
<property name="minimumSize" >
789,7 → 680,7
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>20</width>
<height>20</height>
799,24 → 690,12
</item>
<item row="0" column="0" >
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>0</number>
</property>
<property name="topMargin" >
<number>0</number>
</property>
<property name="rightMargin" >
<number>0</number>
</property>
<property name="bottomMargin" >
<number>0</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="1" column="0" >
<widget class="QLabel" name="textLabel4" >
<property name="text" >
886,24 → 765,12
<string>Text:</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<property name="margin" >
<number>10</number>
</property>
<property name="topMargin" >
<number>10</number>
</property>
<property name="rightMargin" >
<number>10</number>
</property>
<property name="bottomMargin" >
<number>10</number>
</property>
<property name="horizontalSpacing" >
<property name="spacing" >
<number>5</number>
</property>
<property name="verticalSpacing" >
<number>5</number>
</property>
<item row="0" column="2" >
<spacer>
<property name="orientation" >
912,7 → 779,7
<property name="sizeType" >
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0" >
<size>
<width>40</width>
<height>20</height>
/trunk/Scribus/scribus/prefsmanager.cpp
252,6 → 252,7
appPrefs.toolSettings.dispY = 10.0;
appPrefs.toolSettings.constrain = 15.0;
appPrefs.DpapColor = QColor(Qt::white);
appPrefs.showPageShadow = true;
appPrefs.DFrameColor = QColor(Qt::red);
appPrefs.DFrameNormColor = QColor(Qt::black);
appPrefs.DFrameGroupColor = QColor(Qt::darkCyan);
1192,6 → 1193,11
return appPrefs.PaletteFontSize;
}
 
bool PrefsManager::showPageShadow() const
{
return appPrefs.showPageShadow;
}
 
bool PrefsManager::WritePref(QString ho)
{
QDomDocument docu("scribusrc");
1249,6 → 1255,7
dc1.setAttribute("SHOW", static_cast<int>(appPrefs.guidesSettings.gridShown));
elem.appendChild(dc1);
QDomElement dc1a=docu.createElement("PAGE");
dc1a.setAttribute("ShowPageShadow",static_cast<int>(appPrefs.showPageShadow));
dc1a.setAttribute("PAGEC",appPrefs.DpapColor.name());
dc1a.setAttribute("SELEC",appPrefs.DFrameColor.name());
dc1a.setAttribute("DFrameNormColor",appPrefs.DFrameNormColor.name());
1771,6 → 1778,7
}
if (dc.tagName()=="PAGE")
{
appPrefs.showPageShadow = static_cast<bool>(dc.attribute("ShowPageShadow", "1").toInt());
appPrefs.DpapColor = QColor(dc.attribute("PAGEC"));
appPrefs.DFrameColor = QColor(dc.attribute("SELEC","#ff0000"));
appPrefs.DFrameNormColor = QColor(dc.attribute("DFrameNormColor","#000000"));
/trunk/Scribus/scribus/prefsstructs.h
160,6 → 160,7
int Wheelval;
int AppFontSize;
int PaletteFontSize;
bool showPageShadow;
QColor DpapColor;
QColor DFrameColor;
QColor DFrameNormColor;
/trunk/Scribus/scribus/scribus.cpp
1134,10 → 1134,7
bool retVal;
if (e->type() == QEvent::ToolTip)
{
if (prefsManager->appPrefs.showToolTips)
return false;
else
return true;
return (!prefsManager->appPrefs.showToolTips);
}
if ( e->type() == QEvent::KeyPress )
{
7714,6 → 7711,7
//reset the appMode so we restore our tools shortcuts
QString oldGUILanguage = prefsManager->guiLanguage();
QString oldGUIStyle = prefsManager->guiStyle();
bool oldShowPageShadow = prefsManager->showPageShadow();
int oldGUIFontSize = prefsManager->guiFontSize();
double oldDisplayScale = prefsManager->displayScale();
dia->updatePreferences();
7747,6 → 7745,7
ScCore->recheckGS();
prefsManager->applyLoadedShortCuts();
QWidgetList windows = wsp->windowList();
bool shadowChanged = oldShowPageShadow != prefsManager->showPageShadow();
if (!windows.isEmpty())
{
int windowCount=static_cast<int>(windows.count());
7755,6 → 7754,8
QWidget* w = windows.at(i);
ScribusWin* scw = (ScribusWin*) w;
scw->view()->zoom((scw->view()->scale() / oldDisplayScale) * prefsManager->displayScale());
if (shadowChanged)
scw->view()->DrawNew();
}
}
}
/trunk/Scribus/scribus/prefsmanager.h
154,6 → 154,7
const int& paletteFontSize() const;
void setKeyEntry(const QString&, const QString&, const QKeySequence&, const int&);
void setShowStartupDialog(const bool);
bool showPageShadow() const;
//! \brief Sets the preferences' color set
void setColorSet(const ColorList&);
//! \brief Sets the preferences' color set name
/trunk/Scribus/scribus/canvas.cpp
1574,7 → 1574,8
if (m_doc->bleeds.hasNonZeroValue() && m_doc->guidesSettings.showBleed)
{
// painter->drawRect(m_doc->scratch.Left - bleedLeft+5 / m_viewMode.scale, m_doc->scratch.Top - bleedTop+5 / m_viewMode.scale, m_doc->currentPage()->width() + bleedLeft + bleedRight, m_doc->currentPage()->height() + bleedBottom + bleedTop);
painter->drawRect(m_doc->scratch.Left - pageBleeds.Left+5, m_doc->scratch.Top - pageBleeds.Top+5, m_doc->currentPage()->width() + pageBleeds.Left + pageBleeds.Right, m_doc->currentPage()->height() + pageBleeds.Bottom + pageBleeds.Top);
if (PrefsManager::instance()->appPrefs.showPageShadow)
painter->drawRect(m_doc->scratch.Left - pageBleeds.Left+5, m_doc->scratch.Top - pageBleeds.Top+5, m_doc->currentPage()->width() + pageBleeds.Left + pageBleeds.Right, m_doc->currentPage()->height() + pageBleeds.Bottom + pageBleeds.Top);
painter->setBrush(m_doc->papColor);
painter->drawRect(m_doc->scratch.Left - pageBleeds.Left, m_doc->scratch.Top - pageBleeds.Top, m_doc->currentPage()->width() + pageBleeds.Left + pageBleeds.Right, m_doc->currentPage()->height() + pageBleeds.Bottom + pageBleeds.Top);
}
1581,7 → 1582,8
else
{
// painter->drawRect(m_doc->scratch.Left+5 / m_viewMode.scale, m_doc->scratch.Top+5 / m_viewMode.scale, m_doc->currentPage()->width(), m_doc->currentPage()->height());
painter->drawRect(m_doc->scratch.Left+5, m_doc->scratch.Top+5, m_doc->currentPage()->width(), m_doc->currentPage()->height());
if (PrefsManager::instance()->appPrefs.showPageShadow)
painter->drawRect(m_doc->scratch.Left+5, m_doc->scratch.Top+5, m_doc->currentPage()->width(), m_doc->currentPage()->height());
painter->setBrush(m_doc->papColor);
painter->drawRect(m_doc->scratch.Left, m_doc->scratch.Top, m_doc->currentPage()->width(), m_doc->currentPage()->height());
}
1600,7 → 1602,7
void Canvas::drawBackgroundPageOutlines(ScPainter* painter, int clipx, int clipy, int clipw, int cliph)
{
uint docPagesCount=m_doc->Pages->count();
if (!m_viewMode.viewAsPreview)
if (PrefsManager::instance()->appPrefs.showPageShadow && !m_viewMode.viewAsPreview)
{
painter->setBrush(QColor(128,128,128));
painter->setAntialiasing(false);