single scroll for the homescreen

This commit is contained in:
Marco Martin 2015-02-24 16:26:17 +01:00
parent 6a22d1e3f6
commit 5e5f21a31e
2 changed files with 120 additions and 99 deletions

View file

@ -21,8 +21,7 @@ Item {
MouseArea {
anchors.fill: parent
propagateComposedEvents: true
drag.target: stripe
drag.axis: Drag.YAxis
onClicked: {
if (callback) {
callback();

View file

@ -39,6 +39,7 @@ MouseEventListener {
property Item wallpaper;
property var pendingRemovals: [];
property int notificationId: 0;
property int buttonHeight: width/4
/*
Notificadtion data object has the following properties:
@ -89,7 +90,7 @@ MouseEventListener {
}
onPressAndHold: {
containment.action("configure").trigger();
// containment.action("configure").trigger();
}
OfonoManager {
@ -407,21 +408,58 @@ MouseEventListener {
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 {
id: notificationView
spacing: units.smallSpacing
anchors {
top: parent.top
bottom: stripe.top
bottom: parent.bottom
left: parent.left
right: parent.right
bottomMargin: units.smallSpacing
bottomMargin: stripe.height * 2
}
height: contentHeight
interactive: false
z: 1
clip: true
verticalLayoutDirection: ListView.BottomToTop
model: notificationsModel
add: Transition {
NumberAnimation {
properties: "x"
@ -451,11 +489,12 @@ MouseEventListener {
}
delegate: NotificationStripe {}
}
}
SatelliteStripe {
id: stripe
z: 1
z: 99
y: Math.max(applications.contentY + parent.height, parent.height - height - statusPanel.height)
PlasmaCore.Svg {
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 {}
Component.onCompleted : { console.log("WTF " + width) }
}
}