r24213 by jghali - Code style fixes
scribus-commit
scribus-commit at lists.scribus.net
Sun Nov 8 19:28:29 UTC 2020
Author: jghali
Date: Sun Nov 8 19:28:29 2020
New Revision: 24213
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24213
Log:
Code style fixes
Modified:
trunk/Scribus/scribus/prefsmanager.cpp
trunk/Scribus/scribus/ui/scdockpalette.cpp
Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24213&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp (original)
+++ trunk/Scribus/scribus/prefsmanager.cpp Sun Nov 8 19:28:29 2020
@@ -167,9 +167,9 @@
// appPrefs.uiPrefs.mainWinSettings.yPosition = 0;
appPrefs.uiPrefs.mainWinSettings.width = 640;
appPrefs.uiPrefs.mainWinSettings.height = 480;
- QScreen* s=QGuiApplication::primaryScreen();
- appPrefs.uiPrefs.mainWinSettings.xPosition=(s->availableGeometry().width()-appPrefs.uiPrefs.mainWinSettings.width)/2;
- appPrefs.uiPrefs.mainWinSettings.yPosition=(s->availableGeometry().height()-appPrefs.uiPrefs.mainWinSettings.height)/2;
+ QScreen* s = QGuiApplication::primaryScreen();
+ appPrefs.uiPrefs.mainWinSettings.xPosition = (s->availableGeometry().width() - appPrefs.uiPrefs.mainWinSettings.width) / 2;
+ appPrefs.uiPrefs.mainWinSettings.yPosition = (s->availableGeometry().height() - appPrefs.uiPrefs.mainWinSettings.height) / 2;
appPrefs.uiPrefs.mainWinSettings.maximized = false;
appPrefs.uiPrefs.mainWinState = QByteArray();
appPrefs.uiPrefs.RecentDocs.clear();
Modified: trunk/Scribus/scribus/ui/scdockpalette.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24213&path=/trunk/Scribus/scribus/ui/scdockpalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/scdockpalette.cpp (original)
+++ trunk/Scribus/scribus/ui/scdockpalette.cpp Sun Nov 8 19:28:29 2020
@@ -159,13 +159,13 @@
{
QRect scr = QApplication::desktop()->availableGeometry(this);
// all palettes should have enough room for 3x3 min widgets
- int vwidth = qMin(qMax(3*gStrut.width(), m_palettePrefs->getInt("width")),
+ int vwidth = qMin(qMax(3 * gStrut.width(), m_palettePrefs->getInt("width")),
d->width());
- int vheight = qMin(qMax(3*gStrut.height(), m_palettePrefs->getInt("height")),
+ int vheight = qMin(qMax(3 * gStrut.height(), m_palettePrefs->getInt("height")),
d->height());
// palettes should not use too much screen space
- if (vwidth > d->width()/3 && vheight > d->height()/3)
- vwidth = d->width()/3;
+ if (vwidth > d->width() / 3 && vheight > d->height()/3)
+ vwidth = d->width() / 3;
// and should be partly visible
int vleft = qMin(qMax(scr.left() - vwidth + gStrut.width(), m_palettePrefs->getInt("left")),
scr.right() - gStrut.width());
@@ -177,18 +177,18 @@
vtop = qMax(-vheight + gStrut.height(), vtop);
#endif
// Check values against current screen size
- if ( vleft <= scr.left() )
+ if (vleft <= scr.left())
vleft = scr.left();
- if ( vleft >= scr.right() )
+ if (vleft >= scr.right())
vleft = scr.left();
- if ( vtop >= scr.bottom() )
+ if (vtop >= scr.bottom())
vtop = 64;
- if ( vtop <= scr.top() )
+ if (vtop <= scr.top())
vtop = scr.top();
- if ( vwidth >= scr.width() )
- vwidth = qMax( gStrut.width(), scr.width() - vleft );
+ if (vwidth >= scr.width())
+ vwidth = qMax(gStrut.width(), scr.width() - vleft);
if ( vheight >= scr.height() )
- vheight = qMax( gStrut.height(), scr.height() - vtop );
+ vheight = qMax(gStrut.height(), scr.height() - vtop);
// qDebug() << QString("root %1x%2 %7 palette %3x%4 @ (%5,%6)").arg(d->width()).arg(d->height())
// .arg(vwidth).arg(vheight).arg(vleft).arg(vtop).arg(name());
// setGeometry(vleft, vtop, vwidth, vheight);
More information about the scribus-commit
mailing list