Commit cd8295e2 authored by Marco Martin's avatar Marco Martin

favorites always on bottom

parent 3488729e
......@@ -31,7 +31,6 @@ import org.kde.milou 0.1 as Milou
Rectangle {
id: krunner
anchors.fill: parent
height: childrenRect.height
color: listView.visible ? Qt.rgba(0, 0, 0, 0.8) : "transparent"
property alias showingResults: listView.visible
......
......@@ -52,10 +52,9 @@ ContainmentLayoutManager.ItemContainer {
property real dragCenterY
editModeCondition: ContainmentLayoutManager.ItemContainer.AfterPressAndHold
onEditModeChanged: {//FIXME: remove
plasmoid.editMode = editMode
}
onDragActiveChanged: {
launcherDragManager.active = dragActive
if (dragActive) {
// Must be 0, 0 as at this point dragCenterX and dragCenterY are on the drag before"
launcherDragManager.startDrag(delegate);
......
......@@ -30,6 +30,7 @@ Item {
property LauncherGrid launcherGrid
property FavoriteStrip favoriteStrip
property Delegate currentlyDraggedDelegate
property bool active
readonly property Item spacer: Item {
width: units.gridUnit * 4
......
......@@ -32,7 +32,6 @@ import org.kde.phone.homescreen 1.0
LauncherContainer {
id: root
readonly property bool dragging: root.flow.dragData
property bool reorderingApps: false
......
......@@ -39,16 +39,18 @@ Item {
property Item toolBox
Text {
text:"Edit Mode"
color: "white"
visible: plasmoid.editMode
}
Text {
anchors.centerIn: parent
text: plasmoid.availableScreenRect.x + ", " + plasmoid.availableScreenRect.y+ ", "+ plasmoid.availableScreenRect.width + "x" + plasmoid.availableScreenRect.height
color: "white"
}
Column {
anchors.centerIn: parent
Text {
text:"Edit Mode"
color: "white"
visible: plasmoid.editMode
}
Text {
text: plasmoid.availableScreenRect.x + ", " + plasmoid.availableScreenRect.y+ ", "+ plasmoid.availableScreenRect.width + "x" + plasmoid.availableScreenRect.height
color: "white"
}
}
//BEGIN functions
//Autoscroll related functions
function scrollUp() {
......@@ -136,15 +138,22 @@ Text {
id: mainFlickable
anchors {
fill: parent
topMargin: plasmoid.availableScreenRect.y + krunner.inputHeight
bottomMargin: root.height - plasmoid.availableScreenRect.height - topMargin
topMargin: plasmoid.availableScreenRect.y + krunner.inputHeight
bottomMargin: root.height - plasmoid.availableScreenRect.height - topMargin
}
bottomMargin: favoriteStrip.height
contentWidth: width
contentHeight: flickableContents.height
interactive: !plasmoid.editMode && !launcher.dragging
interactive: !plasmoid.editMode && !launcherDragManager.active
property real oldContentY
onContentYChanged: {
if (!atYBeginning) {
krunner.y = Math.min(plasmoid.availableScreenRect.y, Math.max(plasmoid.availableScreenRect.y - krunner.inputHeight, krunner.y + oldContentY - contentY));
}
oldContentY = contentY;
}
PlasmaComponents.ScrollBar.vertical: PlasmaComponents.ScrollBar {
id: scrollabr
opacity: mainFlickable.moving
......@@ -166,10 +175,11 @@ Text {
ColumnLayout {
id: flickableContents
width: parent.width
spacing: Math.max(0, favoriteStrip.frame.height - mainFlickable.contentY)
DragDrop.DropArea {
Layout.fillWidth: true
Layout.preferredHeight: mainFlickable.height //TODO: multiple widgets pages
Layout.preferredHeight: mainFlickable.height - favoriteStrip.frame.height //TODO: multiple widgets pages
onDragEnter: {
event.accept(event.proposedAction);
......@@ -205,7 +215,7 @@ Text {
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
bottomMargin: favoriteStrip.height
//bottomMargin: favoriteStrip.height
}
z: 2
svg: arrowsSvg
......@@ -245,10 +255,9 @@ Text {
appletContainerComponent: ContainmentLayoutManager.BasicAppletContainer {
id: appletContainer
configOverlayComponent: ConfigOverlay {}
onEditModeChanged: {
if (editMode) {
plasmoid.editMode = true;
}
onDragActiveChanged: {
launcherDragManager.active = dragActive;
}
}
......@@ -288,17 +297,19 @@ Text {
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
}
appletsLayout: appletsLayout
launcherGrid: launcher
y: Math.max(krunner.inputHeight, root.height - height - mainFlickable.contentY)
//y: Math.max(krunner.inputHeight, root.height - height - mainFlickable.contentY)
}
KRunner {
id: krunner
z: 998
height: plasmoid.availableScreenRect.height
anchors {
top: parent.top
//top: parent.top
left: parent.left
right: parent.right
topMargin: plasmoid.availableScreenRect.y
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment