Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 13609 → Rev 13610

/branches/Version135/Scribus/scribus/scrpalettebase.cpp
171,6 → 171,7
QSize gStrut = QApplication::globalStrut();
if (palettePrefs->contains("left"))
{
QRect scr = QApplication::desktop()->availableGeometry(this);
// all palettes should have enough room for 3x3 min widgets
int vwidth = qMin(qMax(3*gStrut.width(), palettePrefs->getInt("width")),
d->width());
180,7 → 181,7
if (vwidth > d->width()/3 && vheight > d->height()/3)
vwidth = d->width()/3;
// and should be partly visible
int vleft = qMin(qMax(-vwidth + gStrut.width(), palettePrefs->getInt("left")),
int vleft = qMin(qMax(scr.left() - vwidth + gStrut.width(), palettePrefs->getInt("left")),
d->width() - gStrut.width());
int vtop = qMin(palettePrefs->getInt("top"), d->height() - gStrut.height());
#if defined(Q_OS_MAC) || defined(_WIN32)
190,9 → 191,8
vtop = qMax(-vheight + gStrut.height(), vtop);
#endif
// Check values against current screen size
QRect scr = QApplication::desktop()->availableGeometry(this);
if ( vleft >= scr.width() )
vleft = 0;
if ( vleft >= scr.right() )
vleft = scr.left();
if ( vtop >= scr.bottom() )
vtop = 64;
if ( vtop <= scr.top() )