OTHER: on text change stop draging if new text completely fits into textbar
This commit is contained in:
parent
49e4efad11
commit
866833ebec
1 changed files with 5 additions and 2 deletions
|
@ -127,6 +127,11 @@ TextScroller::drawText ()
|
||||||
} else {
|
} else {
|
||||||
drawBitmapFont (m_text);
|
drawBitmapFont (m_text);
|
||||||
}
|
}
|
||||||
|
updateScrolling ();
|
||||||
|
|
||||||
|
if (m_pixmap.width () <= width ())
|
||||||
|
m_dragtext = false;
|
||||||
|
|
||||||
// take care that the text doesn't jump after resetting it's offset
|
// take care that the text doesn't jump after resetting it's offset
|
||||||
// if we were still dragging it on a song change
|
// if we were still dragging it on a song change
|
||||||
if (m_dragtext)
|
if (m_dragtext)
|
||||||
|
@ -150,7 +155,6 @@ TextScroller::drawBitmapFont (QString text)
|
||||||
} else {
|
} else {
|
||||||
m_pixmap = QPixmap (width (), 6);
|
m_pixmap = QPixmap (width (), 6);
|
||||||
}
|
}
|
||||||
updateScrolling ();
|
|
||||||
QByteArray temp2 = temp.toLatin1();
|
QByteArray temp2 = temp.toLatin1();
|
||||||
const char *t = temp2.data();
|
const char *t = temp2.data();
|
||||||
|
|
||||||
|
@ -193,7 +197,6 @@ TextScroller::drawQtFont (QString text)
|
||||||
} else {
|
} else {
|
||||||
m_pixmap = QPixmap (size ());
|
m_pixmap = QPixmap (size ());
|
||||||
}
|
}
|
||||||
updateScrolling ();
|
|
||||||
|
|
||||||
QPainter paint;
|
QPainter paint;
|
||||||
paint.begin (&m_pixmap);
|
paint.begin (&m_pixmap);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue