Added animation settings
This commit is contained in:
@@ -1,3 +1,22 @@
|
||||
/*
|
||||
* Komplex Wallpaper Engine
|
||||
* Copyright (C) 2026 @DigitalArtifex
|
||||
* https://digitalartifex.dev - https://github.com/DigitalArtifex
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||
*/
|
||||
import QtCore
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
@@ -24,7 +43,6 @@ Rectangle
|
||||
FeaturedImagesModel
|
||||
{
|
||||
id: searchModel
|
||||
//query: rootItem.query
|
||||
resultsPerPage: paginator.resultsPerPage
|
||||
|
||||
Component.onCompleted: () => nextPage()
|
||||
@@ -109,7 +127,8 @@ Rectangle
|
||||
Behavior on opacity {
|
||||
NumberAnimation
|
||||
{
|
||||
duration: 250
|
||||
duration: settings.animationsEnabled ?
|
||||
settings.normalAnimationDuration : 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,7 +136,8 @@ Rectangle
|
||||
Behavior on opacity {
|
||||
NumberAnimation
|
||||
{
|
||||
duration: 250
|
||||
duration: settings.animationsEnabled ?
|
||||
settings.normalAnimationDuration : 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -151,4 +171,17 @@ Rectangle
|
||||
resultsLayout.opacity = 1
|
||||
rootItem.popup = false
|
||||
}
|
||||
|
||||
Settings
|
||||
{
|
||||
id: settings
|
||||
property bool animationsEnabled: true
|
||||
//ms length of page change
|
||||
property int pageChangeAnimationDuration: 250
|
||||
property int pageFadeAnimationDuration: 250
|
||||
|
||||
property int slowAnimationDuration: 750
|
||||
property int normalAnimationDuration: 250
|
||||
property int fastAnimationDuration: 125
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user