Commit 267643ba authored by Bernd Gehrmann's avatar Bernd Gehrmann
Browse files

fix for position calculation if label is wider than screen

svn path=/trunk/kdesdk/cervisia/; revision=163120
parent d5c9db43
......@@ -38,8 +38,10 @@ void TipLabel::showAt(QPoint pos)
{
adjustSize();
pos = QPoint(QMIN(pos.x(), QApplication::desktop()->width()-width()),
QMIN(pos.y(), QApplication::desktop()->height()-height()));
QPoint maxpos = QPoint(QMAX(QApplication::desktop()->width()-width(), 0),
QMAX(QApplication::desktop()->height()-height(), 0));
pos = QPoint(QMIN(pos.x(), maxpos.x()),
QMIN(pos.y(), maxpos.y()));
move(pos);
show();
}
......@@ -58,6 +60,7 @@ QSize TipLabel::sizeHint() const
#include "tiplabel.moc"
// Local Variables:
// c-basic-offset: 4
// End:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment