projects
/
presencevnc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
632c697
)
disable overshooting during scrolling for performance; hide messages when scrolling
author
christian
<pulvermacher@gmx.de>
Sun, 29 Jan 2012 18:51:10 +0000
(19:51 +0100)
committer
christian
<pulvermacher@gmx.de>
Sun, 29 Jan 2012 18:51:10 +0000
(19:51 +0100)
src/scrollarea.h
patch
|
blob
|
history
diff --git
a/src/scrollarea.h
b/src/scrollarea.h
index
1505b3b
..
6e525f1
100644
(file)
--- a/
src/scrollarea.h
+++ b/
src/scrollarea.h
@@
-45,6
+45,13
@@
public:
message_timer.setInterval(2500);
connect(&message_timer, SIGNAL(timeout()),
&message, SLOT(hide()));
message_timer.setInterval(2500);
connect(&message_timer, SIGNAL(timeout()),
&message, SLOT(hide()));
+
+#ifdef Q_WS_MAEMO_5
+ // disable overshooting because it somehow causes repaint events for the whole widget (slow)
+ QAbstractKineticScroller *scroller = property("kineticScroller").value<QAbstractKineticScroller *>();
+ if (scroller)
+ scroller->setOvershootPolicy(QAbstractKineticScroller::OvershootAlwaysOff);
+#endif
}
void showMessage(const QString &s) {
}
void showMessage(const QString &s) {
@@
-59,13
+66,8
@@
protected:
}
virtual void scrollContentsBy(int dx, int dy) {
QScrollArea::scrollContentsBy(dx, dy);
}
virtual void scrollContentsBy(int dx, int dy) {
QScrollArea::scrollContentsBy(dx, dy);
- if(widget()) {
- const QRegion visible_region_new = widget()->visibleRegion();
- const QRegion visible_region_old = visible_region_new.translated(-dx, -dy);
-
- //now update only the region that became visible
- widget()->update(visible_region_new - visible_region_old);
- }
+ if(widget())
+ message.hide(); //overlay-widget slows down scrolling
}
private:
QLabel message;
}
private:
QLabel message;