diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index 03123858b..e2473d66b 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -105,6 +105,11 @@ void PreferencesDialog::setUiFromPrefs()
QModelIndexList languages = m->match(m->index(0, 0), Qt::UserRole, s.value("UiLanguage").toString());
if (languages.count())
ui.languageView->setCurrentIndex(languages.first());
+
+ s.endGroup();
+ s.beginGroup("Animations");
+ int animVelocity = s.value("animation_speed",500).toInt();
+ ui.velocitySlider->setValue(animVelocity);
}
void PreferencesDialog::restorePrefs()
@@ -218,6 +223,8 @@ void PreferencesDialog::syncSettings()
s.setValue("UiLanguage", ui.languageView->currentIndex().data(Qt::UserRole));
s.endGroup();
+ s.beginGroup("Animations");
+ s.setValue("animation_speed",ui.velocitySlider->value());
loadSettings();
emit settingsChanged();
}
@@ -289,6 +296,10 @@ void PreferencesDialog::loadSettings()
prefs.font_size = defaultFont.pointSizeF();
GET_INT("displayinvalid", display_invalid_dives);
s.endGroup();
+
+ s.beginGroup("Animations");
+ int animVelocity = s.value("animation_speed",500).toInt();
+ ui.velocitySlider->setValue(animVelocity);
}
void PreferencesDialog::buttonClicked(QAbstractButton *button)
diff --git a/qt-ui/preferences.ui b/qt-ui/preferences.ui
index 115e93526..e0bd4c27d 100644
--- a/qt-ui/preferences.ui
+++ b/qt-ui/preferences.ui
@@ -231,6 +231,39 @@
+ -
+
+
+ Animations
+
+
+
-
+
+
+ Speed
+
+
+
+ -
+
+
+ 500
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+ 500
+
+
+
+
+
+
-
@@ -746,8 +779,8 @@
accept()
- 235
- 511
+ 247
+ 635
157
@@ -762,8 +795,8 @@
reject()
- 303
- 511
+ 315
+ 635
286
@@ -794,12 +827,12 @@
setEnabled(bool)
- 195
- 39
+ 845
+ 51
- 195
- 39
+ 308
+ 100
@@ -842,12 +875,12 @@
setChecked(bool)
- 20
- 20
+ 504
+ 46
- 20
- 20
+ 623
+ 119
@@ -858,12 +891,12 @@
setChecked(bool)
- 20
- 20
+ 319
+ 46
- 20
- 20
+ 385
+ 119
@@ -874,12 +907,12 @@
setChecked(bool)
- 20
- 20
+ 504
+ 46
- 20
- 20
+ 623
+ 153
@@ -890,12 +923,12 @@
setChecked(bool)
- 20
- 20
+ 319
+ 46
- 20
- 20
+ 385
+ 153
@@ -906,12 +939,12 @@
setChecked(bool)
- 20
- 20
+ 504
+ 46
- 20
- 20
+ 623
+ 187
@@ -922,12 +955,12 @@
setChecked(bool)
- 20
- 20
+ 319
+ 46
- 20
- 20
+ 385
+ 187
@@ -938,12 +971,12 @@
setChecked(bool)
- 20
- 20
+ 504
+ 46
- 20
- 20
+ 623
+ 221
@@ -954,12 +987,12 @@
setChecked(bool)
- 20
- 20
+ 319
+ 46
- 20
- 20
+ 385
+ 221
@@ -970,12 +1003,12 @@
setChecked(bool)
- 20
- 20
+ 504
+ 46
- 20
- 20
+ 623
+ 255
@@ -986,23 +1019,55 @@
setChecked(bool)
- 20
- 20
+ 319
+ 46
- 20
- 20
+ 385
+ 255
+
+
+
+
+ velocitySlider
+ valueChanged(int)
+ velocitySpinBox
+ setValue(int)
+
+
+ 718
+ 415
+
+
+ 823
+ 414
+
+
+
+
+ velocitySpinBox
+ valueChanged(int)
+ velocitySlider
+ setValue(int)
+
+
+ 790
+ 400
+
+
+ 580
+ 417
+
+
+
-
-
-
diff --git a/qt-ui/profile/animationfunctions.cpp b/qt-ui/profile/animationfunctions.cpp
index 608c4c000..81fbf5eee 100644
--- a/qt-ui/profile/animationfunctions.cpp
+++ b/qt-ui/profile/animationfunctions.cpp
@@ -26,6 +26,7 @@ namespace Animations
void moveTo(QObject *obj, qreal x, qreal y)
{
QSettings s;
+ s.beginGroup("Animations");
int msecs = s.value("animation_speed", 500).toInt();
if (msecs != 0){
QPropertyAnimation *animation = new QPropertyAnimation(obj, "pos");