1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-01-11 13:18:13 +03:00

make animation times usable again

--durationTime that was used for the animations
was an integer. This was created extremely fast
animations for x1 and extremely slow animations
for x3. This fix changes that by setting the
durationTime in the qml side to real type. And
by that we are setting the following pragramatic
speeds which create a very good experience.
  x1 = 1.65
  x2 = 2
  x3 = 2.35
the above can be updated a bit based on the user
feedback and experience
This commit is contained in:
Michail Vourlakos 2017-04-22 16:38:47 +03:00
parent 3fd5b3baf5
commit 261283b631
2 changed files with 13 additions and 2 deletions

View File

@ -209,10 +209,21 @@ DragDrop.DropArea {
property bool smartLaunchersEnabled: plasmoid.configuration.smartLaunchersEnabled
property bool threeColorsWindows: plasmoid.configuration.threeColorsWindows
property int durationTime: plasmoid.configuration.durationTime
property int latteAppletHoveredIndex: latteApplet ? latteApplet.hoveredIndex : -1
property int tasksCount: latteApplet ? latteApplet.tasksCount : 0
property real durationTime: {
if (plasmoid.configuration.durationTime === 0 || plasmoid.configuration.durationTime === 2 )
return plasmoid.configuration.durationTime;
if (plasmoid.configuration.durationTime === 1)
return 1.65;
else if (plasmoid.configuration.durationTime === 3)
return 2.35;
return 2;
}
property rect screenGeometry: dock ? dock.screenGeometry : plasmoid.screenGeometry
///END properties from latteApplet

View File

@ -118,7 +118,6 @@ Item {
property bool smartLaunchersEnabled: latteDock ? latteDock.smartLaunchersEnabled : plasmoid.configuration.smartLaunchersEnabled
property bool threeColorsWindows: latteDock ? latteDock.threeColorsWindows : plasmoid.configuration.threeColorsWindows
property int durationTime: latteDock ? latteDock.durationTime : plasmoid.configuration.durationTime
property int iconMargin: latteDock ? latteDock.iconMargin : 0.12*iconSize
property int iconSize: latteDock ? latteDock.iconSize : Math.max(plasmoid.configuration.iconSize, 16)
property int middleClickAction: latteDock ? latteDock.middleClickAction : plasmoid.configuration.middleClickAction
@ -148,6 +147,7 @@ Item {
property int tasksWidth: mouseHandler.width
property int userPanelPosition: latteDock ? latteDock.panelAlignment : plasmoid.configuration.plasmoidPosition
property real durationTime: latteDock ? latteDock.durationTime : plasmoid.configuration.durationTime
property real zoomFactor: latteDock ? latteDock.zoomFactor : ( 1 + (plasmoid.configuration.zoomLevel / 20) )
property alias tasksCount: tasksModel.count