mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-03 18:24:46 +00:00
single scroll for the homescreen
This commit is contained in:
parent
6a22d1e3f6
commit
5e5f21a31e
2 changed files with 120 additions and 99 deletions
|
|
@ -21,8 +21,7 @@ Item {
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
propagateComposedEvents: true
|
propagateComposedEvents: true
|
||||||
drag.target: stripe
|
|
||||||
drag.axis: Drag.YAxis
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback();
|
callback();
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ MouseEventListener {
|
||||||
property Item wallpaper;
|
property Item wallpaper;
|
||||||
property var pendingRemovals: [];
|
property var pendingRemovals: [];
|
||||||
property int notificationId: 0;
|
property int notificationId: 0;
|
||||||
|
property int buttonHeight: width/4
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Notificadtion data object has the following properties:
|
Notificadtion data object has the following properties:
|
||||||
|
|
@ -89,7 +90,7 @@ MouseEventListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
onPressAndHold: {
|
onPressAndHold: {
|
||||||
containment.action("configure").trigger();
|
// containment.action("configure").trigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
OfonoManager {
|
OfonoManager {
|
||||||
|
|
@ -407,21 +408,58 @@ MouseEventListener {
|
||||||
|
|
||||||
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
|
colorGroup: PlasmaCore.Theme.ComplementaryColorGroup
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SatelliteComponents.ApplicationListModel {
|
||||||
|
id: appListModel
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: Qt.rgba(0, 0, 0, 0.7 * height / homescreen.height)
|
||||||
|
anchors {
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
bottom: parent.bottom
|
||||||
|
}
|
||||||
|
height: Math.min(applications.contentY + homescreen.height, homescreen.height)
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: applications.contentY
|
||||||
|
}
|
||||||
|
GridView {
|
||||||
|
id: applications
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
bottom: parent.bottom
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
}
|
||||||
|
z: 1
|
||||||
|
cellWidth: homescreen.buttonHeight
|
||||||
|
cellHeight: cellWidth
|
||||||
|
model: appListModel
|
||||||
|
snapMode: GridView.SnapToRow
|
||||||
|
clip: true
|
||||||
|
header: Item {
|
||||||
|
z: 999
|
||||||
|
width: homescreen.width
|
||||||
|
height: homescreen.height
|
||||||
ListView {
|
ListView {
|
||||||
id: notificationView
|
id: notificationView
|
||||||
spacing: units.smallSpacing
|
spacing: units.smallSpacing
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
bottom: parent.bottom
|
||||||
bottom: stripe.top
|
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
bottomMargin: units.smallSpacing
|
bottomMargin: stripe.height * 2
|
||||||
}
|
}
|
||||||
|
height: contentHeight
|
||||||
|
interactive: false
|
||||||
|
|
||||||
z: 1
|
z: 1
|
||||||
clip: true
|
|
||||||
verticalLayoutDirection: ListView.BottomToTop
|
verticalLayoutDirection: ListView.BottomToTop
|
||||||
model: notificationsModel
|
model: notificationsModel
|
||||||
|
|
||||||
add: Transition {
|
add: Transition {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
properties: "x"
|
properties: "x"
|
||||||
|
|
@ -451,11 +489,12 @@ MouseEventListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
delegate: NotificationStripe {}
|
delegate: NotificationStripe {}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
SatelliteStripe {
|
SatelliteStripe {
|
||||||
id: stripe
|
id: stripe
|
||||||
z: 1
|
z: 99
|
||||||
|
y: Math.max(applications.contentY + parent.height, parent.height - height - statusPanel.height)
|
||||||
|
|
||||||
PlasmaCore.Svg {
|
PlasmaCore.Svg {
|
||||||
id: stripeIcons
|
id: stripeIcons
|
||||||
|
|
@ -500,28 +539,11 @@ MouseEventListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SatelliteComponents.ApplicationListModel {
|
|
||||||
id: appListModel
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GridView {
|
|
||||||
id: applications
|
|
||||||
anchors {
|
|
||||||
top: stripe.bottom
|
|
||||||
bottom: parent.bottom
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
topMargin: units.smallSpacing
|
|
||||||
}
|
|
||||||
z: 1
|
|
||||||
cellWidth: stripe.height * 2
|
|
||||||
cellHeight: cellWidth
|
|
||||||
model: appListModel
|
|
||||||
snapMode: GridView.SnapToRow
|
|
||||||
clip: true
|
|
||||||
delegate: HomeLauncher {}
|
delegate: HomeLauncher {}
|
||||||
Component.onCompleted : { console.log("WTF " + width) }
|
Component.onCompleted : { console.log("WTF " + width) }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue