mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
favorites always on bottom
This commit is contained in:
parent
3488729e69
commit
cd8295e296
5 changed files with 35 additions and 26 deletions
|
|
@ -31,7 +31,6 @@ import org.kde.milou 0.1 as Milou
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: krunner
|
id: krunner
|
||||||
anchors.fill: parent
|
|
||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
color: listView.visible ? Qt.rgba(0, 0, 0, 0.8) : "transparent"
|
color: listView.visible ? Qt.rgba(0, 0, 0, 0.8) : "transparent"
|
||||||
property alias showingResults: listView.visible
|
property alias showingResults: listView.visible
|
||||||
|
|
|
||||||
|
|
@ -52,10 +52,9 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
property real dragCenterY
|
property real dragCenterY
|
||||||
|
|
||||||
editModeCondition: ContainmentLayoutManager.ItemContainer.AfterPressAndHold
|
editModeCondition: ContainmentLayoutManager.ItemContainer.AfterPressAndHold
|
||||||
onEditModeChanged: {//FIXME: remove
|
|
||||||
plasmoid.editMode = editMode
|
|
||||||
}
|
|
||||||
onDragActiveChanged: {
|
onDragActiveChanged: {
|
||||||
|
launcherDragManager.active = dragActive
|
||||||
if (dragActive) {
|
if (dragActive) {
|
||||||
// Must be 0, 0 as at this point dragCenterX and dragCenterY are on the drag before"
|
// Must be 0, 0 as at this point dragCenterX and dragCenterY are on the drag before"
|
||||||
launcherDragManager.startDrag(delegate);
|
launcherDragManager.startDrag(delegate);
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ Item {
|
||||||
property LauncherGrid launcherGrid
|
property LauncherGrid launcherGrid
|
||||||
property FavoriteStrip favoriteStrip
|
property FavoriteStrip favoriteStrip
|
||||||
property Delegate currentlyDraggedDelegate
|
property Delegate currentlyDraggedDelegate
|
||||||
|
property bool active
|
||||||
|
|
||||||
readonly property Item spacer: Item {
|
readonly property Item spacer: Item {
|
||||||
width: units.gridUnit * 4
|
width: units.gridUnit * 4
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ import org.kde.phone.homescreen 1.0
|
||||||
LauncherContainer {
|
LauncherContainer {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property bool dragging: root.flow.dragData
|
|
||||||
property bool reorderingApps: false
|
property bool reorderingApps: false
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,16 +39,18 @@ Item {
|
||||||
|
|
||||||
property Item toolBox
|
property Item toolBox
|
||||||
|
|
||||||
|
Column {
|
||||||
|
anchors.centerIn: parent
|
||||||
Text {
|
Text {
|
||||||
text:"Edit Mode"
|
text:"Edit Mode"
|
||||||
color: "white"
|
color: "white"
|
||||||
visible: plasmoid.editMode
|
visible: plasmoid.editMode
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
anchors.centerIn: parent
|
|
||||||
text: plasmoid.availableScreenRect.x + ", " + plasmoid.availableScreenRect.y+ ", "+ plasmoid.availableScreenRect.width + "x" + plasmoid.availableScreenRect.height
|
text: plasmoid.availableScreenRect.x + ", " + plasmoid.availableScreenRect.y+ ", "+ plasmoid.availableScreenRect.width + "x" + plasmoid.availableScreenRect.height
|
||||||
color: "white"
|
color: "white"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//BEGIN functions
|
//BEGIN functions
|
||||||
//Autoscroll related functions
|
//Autoscroll related functions
|
||||||
function scrollUp() {
|
function scrollUp() {
|
||||||
|
|
@ -143,8 +145,15 @@ Text {
|
||||||
bottomMargin: favoriteStrip.height
|
bottomMargin: favoriteStrip.height
|
||||||
contentWidth: width
|
contentWidth: width
|
||||||
contentHeight: flickableContents.height
|
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 {
|
PlasmaComponents.ScrollBar.vertical: PlasmaComponents.ScrollBar {
|
||||||
id: scrollabr
|
id: scrollabr
|
||||||
opacity: mainFlickable.moving
|
opacity: mainFlickable.moving
|
||||||
|
|
@ -166,10 +175,11 @@ Text {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: flickableContents
|
id: flickableContents
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
spacing: Math.max(0, favoriteStrip.frame.height - mainFlickable.contentY)
|
||||||
|
|
||||||
DragDrop.DropArea {
|
DragDrop.DropArea {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: mainFlickable.height //TODO: multiple widgets pages
|
Layout.preferredHeight: mainFlickable.height - favoriteStrip.frame.height //TODO: multiple widgets pages
|
||||||
|
|
||||||
onDragEnter: {
|
onDragEnter: {
|
||||||
event.accept(event.proposedAction);
|
event.accept(event.proposedAction);
|
||||||
|
|
@ -205,7 +215,7 @@ Text {
|
||||||
anchors {
|
anchors {
|
||||||
horizontalCenter: parent.horizontalCenter
|
horizontalCenter: parent.horizontalCenter
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
bottomMargin: favoriteStrip.height
|
//bottomMargin: favoriteStrip.height
|
||||||
}
|
}
|
||||||
z: 2
|
z: 2
|
||||||
svg: arrowsSvg
|
svg: arrowsSvg
|
||||||
|
|
@ -245,10 +255,9 @@ Text {
|
||||||
appletContainerComponent: ContainmentLayoutManager.BasicAppletContainer {
|
appletContainerComponent: ContainmentLayoutManager.BasicAppletContainer {
|
||||||
id: appletContainer
|
id: appletContainer
|
||||||
configOverlayComponent: ConfigOverlay {}
|
configOverlayComponent: ConfigOverlay {}
|
||||||
onEditModeChanged: {
|
|
||||||
if (editMode) {
|
onDragActiveChanged: {
|
||||||
plasmoid.editMode = true;
|
launcherDragManager.active = dragActive;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -288,17 +297,19 @@ Text {
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
|
bottom: parent.bottom
|
||||||
}
|
}
|
||||||
appletsLayout: appletsLayout
|
appletsLayout: appletsLayout
|
||||||
launcherGrid: launcher
|
launcherGrid: launcher
|
||||||
y: Math.max(krunner.inputHeight, root.height - height - mainFlickable.contentY)
|
//y: Math.max(krunner.inputHeight, root.height - height - mainFlickable.contentY)
|
||||||
}
|
}
|
||||||
|
|
||||||
KRunner {
|
KRunner {
|
||||||
id: krunner
|
id: krunner
|
||||||
z: 998
|
z: 998
|
||||||
|
height: plasmoid.availableScreenRect.height
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
//top: parent.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
topMargin: plasmoid.availableScreenRect.y
|
topMargin: plasmoid.availableScreenRect.y
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue