Revert "Gui: Refactor navigation animations"

This commit is contained in:
Yorik van Havre
2023-09-26 19:44:16 +02:00
committed by GitHub
parent 3433ce70a6
commit ffd66cf826
15 changed files with 352 additions and 674 deletions

View File

@@ -88,8 +88,7 @@ void DlgSettingsNavigation::saveSettings()
ui->rotationCenterSize->onSave();
ui->rotationCenterColor->onSave();
ui->spinBoxZoomStep->onSave();
ui->checkBoxNavigationAnimations->onSave();
ui->spinBoxAnimationDuration->onSave();
ui->checkBoxUseAutoRotation->onSave();
ui->qspinNewDocScale->onSave();
ui->prefStepByTurn->onSave();
ui->naviCubeCorner->onSave();
@@ -116,7 +115,7 @@ void DlgSettingsNavigation::saveSettings()
hGrp = App::GetApplication().GetParameterGroupByPath(
"User parameter:BaseApp/Preferences/NaviCube");
if (ui->naviCubeFontName->currentIndex()) {
hGrp->SetASCII("FontString", ui->naviCubeFontName->currentText().toLatin1());
hGrp->SetASCII("FontString", ui->naviCubeFontName->currentText().toLatin1());
} else {
hGrp->RemoveASCII("FontString");
}
@@ -130,8 +129,7 @@ void DlgSettingsNavigation::loadSettings()
ui->rotationCenterSize->onRestore();
ui->rotationCenterColor->onRestore();
ui->spinBoxZoomStep->onRestore();
ui->checkBoxNavigationAnimations->onRestore();
ui->spinBoxAnimationDuration->onRestore();
ui->checkBoxUseAutoRotation->onRestore();
ui->qspinNewDocScale->onRestore();
ui->prefStepByTurn->onRestore();
ui->naviCubeCorner->onRestore();
@@ -193,7 +191,7 @@ void DlgSettingsNavigation::loadSettings()
QStringList familyNames = QFontDatabase::families(QFontDatabase::Any);
#endif
ui->naviCubeFontName->addItems(familyNames);
hGrp = App::GetApplication().GetParameterGroupByPath(
"User parameter:BaseApp/Preferences/NaviCube");
int indexFamilyNames = familyNames.indexOf(

View File

@@ -566,91 +566,27 @@ The value is the diameter of the sphere to fit on the screen.</string>
</widget>
</item>
<item row="5" column="0">
<widget class="Gui::PrefCheckBox" name="checkBoxNavigationAnimations">
<widget class="Gui::PrefCheckBox" name="checkBoxUseAutoRotation">
<property name="enabled">
<bool>true</bool>
</property>
<property name="toolTip">
<string>Enable navigation animations</string>
<string>Enable animated rotations</string>
</property>
<property name="text">
<string>Enable navigation animations</string>
<string>Enable animation</string>
</property>
<property name="checked">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="prefEntry" stdset="0">
<cstring>UseNavigationAnimations</cstring>
<cstring>UseAutoRotation</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>View</cstring>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QLabel" name="navigationAnimationsLabel">
<property name="toolTip">
<string>Duration of navigation animations that have a fixed duration</string>
</property>
<property name="text">
<string>Animation duration</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="5" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="Gui::PrefSpinBox" name="spinBoxAnimationDuration">
<property name="maximumSize">
<size>
<width>60</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>The duration of navigation animations in milliseconds</string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
<property name="singleStep">
<number>50</number>
</property>
<property name="value">
<number>250</number>
</property>
<property name="prefEntry" stdset="0">
<cstring>AnimationDuration</cstring>
</property>
<property name="prefPath" stdset="0">
<cstring>View</cstring>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="6" column="0">
<widget class="Gui::PrefCheckBox" name="checkBoxZoomAtCursor">
<property name="toolTip">
@@ -673,7 +609,7 @@ The value is the diameter of the sphere to fit on the screen.</string>
<item row="6" column="1">
<widget class="QLabel" name="label">
<property name="text">
<string>Zoom step</string>
<string> Zoom step</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>