mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 22:33:08 +00:00
restore krunner
fix icons sizes when dragged around
This commit is contained in:
parent
b31b6289dd
commit
0670efbdff
5 changed files with 27 additions and 11 deletions
|
|
@ -53,7 +53,7 @@ Rectangle {
|
||||||
clip: true
|
clip: true
|
||||||
imagePath: "widgets/background"
|
imagePath: "widgets/background"
|
||||||
enabledBorders: PlasmaCore.FrameSvg.BottomBorder
|
enabledBorders: PlasmaCore.FrameSvg.BottomBorder
|
||||||
height: childrenRect.height + fixedMargins.top/2 + fixedMargins.bottom
|
height: Math.min(krunner.height, childrenRect.height + fixedMargins.top/2 + fixedMargins.bottom)
|
||||||
Behavior on height {
|
Behavior on height {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: units.longDuration
|
duration: units.longDuration
|
||||||
|
|
@ -71,7 +71,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
height: Qt.inputMethod.keyboardRectangle.height > 0 ? (Math.min(implicitHeight, Qt.inputMethod.keyboardRectangle.y - plasmoid.availableScreenRect.y)) : implicitHeight
|
height: Qt.inputMethod.keyboardRectangle.height > 0 ? (Math.min(implicitHeight, background.height, Qt.inputMethod.keyboardRectangle.y - plasmoid.availableScreenRect.y)) : implicitHeight
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
|
|
||||||
property var modelData: typeof model !== "undefined" ? model : null
|
property var modelData: typeof model !== "undefined" ? model : null
|
||||||
|
|
||||||
Layout.minimumWidth: availableCellWidth
|
Layout.minimumWidth: launcherGrid.cellWidth
|
||||||
Layout.minimumHeight: availableCellHeight
|
Layout.minimumHeight: launcherGrid.cellHeight
|
||||||
|
|
||||||
leftPadding: units.smallSpacing * 2
|
leftPadding: units.smallSpacing * 2
|
||||||
topPadding: units.smallSpacing * 2
|
topPadding: units.smallSpacing * 2
|
||||||
|
|
@ -72,8 +72,8 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
dragCenterY = dragCenter.y;
|
dragCenterY = dragCenter.y;
|
||||||
launcherDragManager.dragItem(delegate, dragCenter.x, dragCenter.y);
|
launcherDragManager.dragItem(delegate, dragCenter.x, dragCenter.y);
|
||||||
|
|
||||||
delegate.height = availableCellHeight;
|
delegate.width = launcherGrid.cellWidth;
|
||||||
delegate.width = availableCellWidth;
|
delegate.height = launcherGrid.cellHeight;
|
||||||
|
|
||||||
var pos = plasmoid.fullRepresentationItem.mapFromItem(delegate, dragCenter.x, dragCenter.y);
|
var pos = plasmoid.fullRepresentationItem.mapFromItem(delegate, dragCenter.x, dragCenter.y);
|
||||||
//SCROLL UP
|
//SCROLL UP
|
||||||
|
|
@ -108,7 +108,7 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: parent.height - root.reservedSpaceForLabel
|
Layout.minimumHeight: parent.height - root.reservedSpaceForLabel
|
||||||
|
|
||||||
source: modelData ? modelData.ApplicationIconRole : ""
|
source: modelData ? modelData.ApplicationIconRole : ""
|
||||||
scale: root.reorderingApps && dragDelegate && !dragging ? 0.6 : 1
|
scale: root.reorderingApps && dragDelegate && !dragging ? 0.6 : 1
|
||||||
|
|
@ -132,9 +132,9 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
maximumLineCount: 2
|
maximumLineCount: 2
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
|
|
||||||
text: model.ApplicationNameRole + " "+model.ApplicationLocationRole
|
text: model.ApplicationNameRole
|
||||||
font.pixelSize: theme.defaultFont.pixelSize
|
font.pixelSize: theme.defaultFont.pixelSize
|
||||||
color: model.ApplicationLocationRole == ApplicationListModel.Desktop ? "white" : "black"//PlasmaCore.Theme.textColor
|
color: model.ApplicationLocationRole == ApplicationListModel.Desktop ? "white" : theme.textColor
|
||||||
|
|
||||||
layer.enabled: model.ApplicationLocationRole == ApplicationListModel.Desktop
|
layer.enabled: model.ApplicationLocationRole == ApplicationListModel.Desktop
|
||||||
layer.effect: DropShadow {
|
layer.effect: DropShadow {
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ LauncherContainer {
|
||||||
readonly property int count: flow.width / launcherGrid.cellWidth
|
readonly property int count: flow.width / launcherGrid.cellWidth
|
||||||
|
|
||||||
flow.flow: Flow.TopToBottom
|
flow.flow: Flow.TopToBottom
|
||||||
|
favoriteStrip: root
|
||||||
|
|
||||||
visible: plasmoid.nativeInterface.applicationListModel.favoriteCount > 0 || plasmoid.editMode
|
visible: plasmoid.nativeInterface.applicationListModel.favoriteCount > 0 || plasmoid.editMode
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,8 @@ LauncherContainer {
|
||||||
readonly property int cellWidth: root.flow.width / Math.floor(root.flow.width / ((availableCellHeight - reservedSpaceForLabel) + units.smallSpacing*4))
|
readonly property int cellWidth: root.flow.width / Math.floor(root.flow.width / ((availableCellHeight - reservedSpaceForLabel) + units.smallSpacing*4))
|
||||||
readonly property int cellHeight: availableCellHeight
|
readonly property int cellHeight: availableCellHeight
|
||||||
|
|
||||||
|
launcherGrid: root
|
||||||
|
|
||||||
frame.width: width
|
frame.width: width
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,8 @@ Text {
|
||||||
id: mainFlickable
|
id: mainFlickable
|
||||||
anchors {
|
anchors {
|
||||||
fill: parent
|
fill: parent
|
||||||
// bottomMargin: favoriteStrip.height
|
topMargin: plasmoid.availableScreenRect.y + krunner.inputHeight
|
||||||
|
bottomMargin: root.height - plasmoid.availableScreenRect.height - topMargin
|
||||||
}
|
}
|
||||||
|
|
||||||
bottomMargin: favoriteStrip.height
|
bottomMargin: favoriteStrip.height
|
||||||
|
|
@ -146,6 +147,7 @@ Text {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: flickableContents
|
id: flickableContents
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
DragDrop.DropArea {
|
DragDrop.DropArea {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: mainFlickable.height //TODO: multiple widgets pages
|
Layout.preferredHeight: mainFlickable.height //TODO: multiple widgets pages
|
||||||
|
|
@ -253,7 +255,18 @@ Text {
|
||||||
}
|
}
|
||||||
appletsLayout: appletsLayout
|
appletsLayout: appletsLayout
|
||||||
launcherGrid: launcher
|
launcherGrid: launcher
|
||||||
y: Math.max(0, root.height - height - mainFlickable.contentY)
|
y: Math.max(krunner.inputHeight, root.height - height - mainFlickable.contentY)
|
||||||
|
}
|
||||||
|
|
||||||
|
KRunner {
|
||||||
|
id: krunner
|
||||||
|
z: 998
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
|
topMargin: plasmoid.availableScreenRect.y
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue