Changeset View
Changeset View
Standalone View
Standalone View
src/declarativeimports/core/units.cpp
Show All 27 Lines | |||||
28 | #include <QQuickWindow> | 28 | #include <QQuickWindow> | ||
29 | #include <QScreen> | 29 | #include <QScreen> | ||
30 | #include <QFontMetrics> | 30 | #include <QFontMetrics> | ||
31 | #include <cmath> | 31 | #include <cmath> | ||
32 | 32 | | |||
33 | #include <KConfigWatcher> | 33 | #include <KConfigWatcher> | ||
34 | #include <KIconLoader> | 34 | #include <KIconLoader> | ||
35 | 35 | | |||
36 | const int defaultLongDuration = 120; | 36 | const int defaultLongDuration = 250; | ||
37 | 37 | | |||
38 | 38 | | |||
39 | SharedAppFilter::SharedAppFilter(QObject *parent) | 39 | SharedAppFilter::SharedAppFilter(QObject *parent) | ||
40 | : QObject(parent) | 40 | : QObject(parent) | ||
41 | { | 41 | { | ||
42 | QCoreApplication::instance()->installEventFilter(this); | 42 | QCoreApplication::instance()->installEventFilter(this); | ||
43 | } | 43 | } | ||
44 | 44 | | |||
▲ Show 20 Lines • Show All 222 Lines • ▼ Show 20 Line(s) | |||||
267 | 267 | | |||
268 | int Units::longDuration() const | 268 | int Units::longDuration() const | ||
269 | { | 269 | { | ||
270 | return m_longDuration; | 270 | return m_longDuration; | ||
271 | } | 271 | } | ||
272 | 272 | | |||
273 | int Units::shortDuration() const | 273 | int Units::shortDuration() const | ||
274 | { | 274 | { | ||
275 | return qMax(1, m_longDuration / 5); | 275 | return qMax(1, qRound(m_longDuration * 0.6)); | ||
276 | } | ||||
277 | | ||||
278 | int Units::veryLongDuration() const | ||||
279 | { | ||||
280 | return m_longDuration * 2; | ||||
276 | } | 281 | } | ||
277 | 282 | | |||
278 | #include "moc_units.cpp" | 283 | #include "moc_units.cpp" | ||
279 | 284 | |