mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
kscreensaver: set variable indicating update to false once message width is calculated
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4ef70348f8
commit
3ec7aa5392
1 changed files with 7 additions and 4 deletions
|
@ -396,7 +396,9 @@ void KBannerSetup::slotHelp()
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
KBannerSaver::KBannerSaver( WId id ) : KScreenSaver( id )
|
||||
KBannerSaver::KBannerSaver(WId id)
|
||||
: KScreenSaver(id),
|
||||
needUpdate(false)
|
||||
{
|
||||
krnd = new KRandomSequence();
|
||||
readSettings();
|
||||
|
@ -537,8 +539,9 @@ void KBannerSaver::paintEvent(QPaintEvent *event)
|
|||
|
||||
xpos -= step;
|
||||
|
||||
if (cyclingColor || needUpdate) {
|
||||
if (needUpdate) {
|
||||
messageWidth = QFontMetrics(font).boundingRect(message).width();
|
||||
needUpdate = false;
|
||||
}
|
||||
|
||||
QPainter p(this);
|
||||
|
|
Loading…
Add table
Reference in a new issue