2019-08-09 11:39:37 +00:00
|
|
|
/*
|
2021-03-01 20:03:25 +00:00
|
|
|
* SPDX-FileCopyrightText: 2019 Marco Martin <mart@kde.org>
|
2019-08-09 11:39:37 +00:00
|
|
|
*
|
2021-03-01 20:03:25 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2019-08-09 11:39:37 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import QtQuick 2.4
|
|
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
|
import QtQuick.Controls 2.3 as Controls
|
|
|
|
|
|
|
|
|
|
import org.kde.plasma.plasmoid 2.0
|
|
|
|
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
|
|
|
|
import org.kde.kquickcontrolsaddons 2.0
|
|
|
|
|
|
|
|
|
|
|
2019-08-16 13:50:37 +00:00
|
|
|
LauncherContainer {
|
2019-08-09 11:39:37 +00:00
|
|
|
id: root
|
|
|
|
|
|
2021-02-15 10:44:48 +00:00
|
|
|
readonly property int count: flow.width / cellWidth
|
2019-08-15 11:19:16 +00:00
|
|
|
|
2019-08-16 13:50:37 +00:00
|
|
|
flow.flow: Flow.TopToBottom
|
2019-08-15 11:19:16 +00:00
|
|
|
|
2021-02-15 10:44:48 +00:00
|
|
|
height: visible ? cellHeight : 0
|
2019-08-22 11:14:28 +00:00
|
|
|
|
2021-02-15 10:44:48 +00:00
|
|
|
frame.implicitWidth: cellWidth * Math.max(1, flow.children.length) + frame.leftPadding + frame.rightPadding
|
2019-09-03 15:52:45 +00:00
|
|
|
|
2020-02-14 15:09:44 +00:00
|
|
|
Behavior on height {
|
|
|
|
|
NumberAnimation {
|
2021-09-13 16:40:56 +00:00
|
|
|
duration: PlasmaCore.Units.longDuration
|
2020-02-14 15:09:44 +00:00
|
|
|
easing.type: Easing.InOutQuad
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-09-03 15:52:45 +00:00
|
|
|
Behavior on opacity {
|
|
|
|
|
OpacityAnimator {
|
2021-09-13 16:40:56 +00:00
|
|
|
duration: PlasmaCore.Units.longDuration * 4
|
2019-09-03 15:52:45 +00:00
|
|
|
easing.type: Easing.InOutQuad
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-08-09 11:39:37 +00:00
|
|
|
}
|