mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 10:14:45 +00:00
Add lockscreen notification animations, and delegate recycler
This commit is contained in:
parent
834a4a7108
commit
77414b5230
1 changed files with 25 additions and 10 deletions
|
|
@ -15,13 +15,14 @@ You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import QtQuick 2.12
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.1
|
||||||
import QtQuick.Layouts 1.1
|
import QtQuick.Layouts 1.1
|
||||||
import QtGraphicalEffects 1.12
|
import QtGraphicalEffects 1.12
|
||||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||||
import org.kde.notificationmanager 1.1 as Notifications
|
import org.kde.notificationmanager 1.1 as Notifications
|
||||||
|
import org.kde.kirigami 2.13 as Kirigami
|
||||||
import "../components"
|
import "../components"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
@ -108,6 +109,20 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: notificationComponent
|
||||||
|
Column {
|
||||||
|
width: notificationListView.width
|
||||||
|
spacing: units.smallSpacing
|
||||||
|
|
||||||
|
// insert application heading here once application grouping is implemented
|
||||||
|
|
||||||
|
SimpleNotification {
|
||||||
|
notification: model
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: notificationListView
|
id: notificationListView
|
||||||
model: notifModel
|
model: notifModel
|
||||||
|
|
@ -125,15 +140,15 @@ Item {
|
||||||
opacity: 1 - (passwordFlickable.contentY / passwordFlickable.columnHeight)
|
opacity: 1 - (passwordFlickable.contentY / passwordFlickable.columnHeight)
|
||||||
spacing: units.gridUnit
|
spacing: units.gridUnit
|
||||||
|
|
||||||
delegate: Column {
|
delegate: Kirigami.DelegateRecycler {
|
||||||
width: notificationListView.width
|
sourceComponent: notificationComponent
|
||||||
spacing: units.smallSpacing
|
}
|
||||||
|
add: Transition {
|
||||||
// insert application heading here once application grouping is implemented
|
NumberAnimation { property: "opacity"; from: 0; to: 1.0; duration: Kirigami.Units.shortDuration }
|
||||||
|
NumberAnimation { property: "scale"; from: 0; to: 1.0; duration: Kirigami.Units.shortDuration }
|
||||||
SimpleNotification {
|
}
|
||||||
notification: model
|
displaced: Transition {
|
||||||
}
|
NumberAnimation { properties: "x,y"; duration: Kirigami.Units.shortDuration; easing.type: Easing.InOutQuad }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue