aboutsummaryrefslogtreecommitdiff
path: root/src/textscroller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/textscroller.cpp')
-rw-r--r--src/textscroller.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/textscroller.cpp b/src/textscroller.cpp
index 98460b62b..35e4ed4eb 100644
--- a/src/textscroller.cpp
+++ b/src/textscroller.cpp
@@ -45,7 +45,8 @@ TextScroller::TextScroller ( QWidget *parent )
readSettings();
m_timer = new QTimer ( this );
connect ( m_timer, SIGNAL ( timeout() ),SLOT ( addOffset() ) );
- m_timer -> start ( 50 );
+ m_timer->setInterval(50);
+ m_timer->start();
updateSkin();
connect(m_skin, SIGNAL(skinChanged()), this, SLOT(updateSkin()));
}
@@ -103,3 +104,13 @@ void TextScroller::readSettings()
m_metrics = new QFontMetrics(m_font);
}
}
+
+void TextScroller::hideEvent ( QHideEvent *)
+{
+ m_timer->stop();
+}
+
+void TextScroller::showEvent ( QShowEvent *)
+{
+ m_timer->start();
+}