mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
let LauncherRepeater know about thefavorite strip
This commit is contained in:
parent
ee6f80de62
commit
66bf27b9e4
4 changed files with 14 additions and 11 deletions
|
|
@ -91,7 +91,7 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
if (modelData.applicationRunning) {
|
if (modelData.applicationRunning) {
|
||||||
delegate.launch(0, 0, "", modelData.applicationName);
|
delegate.launch(0, 0, "", modelData.applicationName);
|
||||||
} else {
|
} else {
|
||||||
delegate.launch(delegate.x + (units.smallSpacing * 2), delegate.y + (units.smallSpacing * 2), icon.source, modelData.applicationName);
|
delegate.launch(delegate.x + (PlasmaCore.Units.smallSpacing * 2), delegate.y + (PlasmaCore.Units.smallSpacing * 2), icon.source, modelData.applicationName);
|
||||||
}
|
}
|
||||||
|
|
||||||
plasmoid.nativeInterface.applicationListModel.setMinimizedDelegate(index, delegate);
|
plasmoid.nativeInterface.applicationListModel.setMinimizedDelegate(index, delegate);
|
||||||
|
|
@ -102,10 +102,10 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors {
|
anchors {
|
||||||
fill: parent
|
fill: parent
|
||||||
leftMargin: units.smallSpacing * 2
|
leftMargin: PlasmaCore.Units.smallSpacing * 2
|
||||||
topMargin: units.smallSpacing * 2
|
topMargin: PlasmaCore.Units.smallSpacing * 2
|
||||||
rightMargin: units.smallSpacing * 2
|
rightMargin: PlasmaCore.Units.smallSpacing * 2
|
||||||
bottomMargin: units.smallSpacing * 2
|
bottomMargin: PlasmaCore.Units.smallSpacing * 2
|
||||||
}
|
}
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
|
|
@ -114,7 +114,7 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.minimumHeight: Math.min(units.iconSizes.large, parent.height - delegate.reservedSpaceForLabel)
|
Layout.minimumHeight: Math.min(PlasmaCore.Units.iconSizes.large, parent.height - delegate.reservedSpaceForLabel)
|
||||||
Layout.preferredHeight: Layout.minimumHeight
|
Layout.preferredHeight: Layout.minimumHeight
|
||||||
|
|
||||||
usesPlasmaTheme: false
|
usesPlasmaTheme: false
|
||||||
|
|
@ -127,7 +127,7 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
}
|
}
|
||||||
visible: model.applicationRunning
|
visible: model.applicationRunning
|
||||||
radius: width
|
radius: width
|
||||||
width: units.smallSpacing
|
width: PlasmaCore.Units.smallSpacing
|
||||||
height: width
|
height: width
|
||||||
color: theme.highlightColor
|
color: theme.highlightColor
|
||||||
}
|
}
|
||||||
|
|
@ -145,8 +145,8 @@ ContainmentLayoutManager.ItemContainer {
|
||||||
Layout.preferredHeight: delegate.reservedSpaceForLabel
|
Layout.preferredHeight: delegate.reservedSpaceForLabel
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
Layout.alignment: Qt.AlignTop
|
Layout.alignment: Qt.AlignTop
|
||||||
Layout.leftMargin: -parent.anchors.leftMargin + units.smallSpacing
|
Layout.leftMargin: -parent.anchors.leftMargin + PlasmaCore.Units.smallSpacing
|
||||||
Layout.rightMargin: -parent.anchors.rightMargin + units.smallSpacing
|
Layout.rightMargin: -parent.anchors.rightMargin + PlasmaCore.Units.smallSpacing
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
verticalAlignment: Text.AlignTop
|
verticalAlignment: Text.AlignTop
|
||||||
maximumLineCount: 2
|
maximumLineCount: 2
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ DragDrop.DropArea {
|
||||||
|
|
||||||
property alias appletsLayout: appletsLayout
|
property alias appletsLayout: appletsLayout
|
||||||
|
|
||||||
|
property FavoriteStrip favoriteStrip
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: plasmoid
|
target: plasmoid
|
||||||
function onEditModeChanged() {
|
function onEditModeChanged() {
|
||||||
|
|
@ -199,7 +201,7 @@ DragDrop.DropArea {
|
||||||
cellWidth: appletsLayout.cellWidth
|
cellWidth: appletsLayout.cellWidth
|
||||||
cellHeight: appletsLayout.cellHeight
|
cellHeight: appletsLayout.cellHeight
|
||||||
appletsLayout: appletsLayout
|
appletsLayout: appletsLayout
|
||||||
favoriteStrip: favoriteStrip
|
favoriteStrip: dropArea.favoriteStrip
|
||||||
onScrollLeftRequested: mainFlickable.scrollLeft()
|
onScrollLeftRequested: mainFlickable.scrollLeft()
|
||||||
onScrollRightRequested: mainFlickable.scrollRight()
|
onScrollRightRequested: mainFlickable.scrollRight()
|
||||||
onStopScrollRequested: mainFlickable.stopScroll()
|
onStopScrollRequested: mainFlickable.stopScroll()
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ Repeater {
|
||||||
Binding {
|
Binding {
|
||||||
target: delegate
|
target: delegate
|
||||||
property: "height"
|
property: "height"
|
||||||
value: Math.min(parent.height, launcherRepeater.cellHeight)
|
value: Math.min(delegate.parent.height, launcherRepeater.cellHeight)
|
||||||
}
|
}
|
||||||
parent: parentFromLocation
|
parent: parentFromLocation
|
||||||
reservedSpaceForLabel: metrics.height
|
reservedSpaceForLabel: metrics.height
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,7 @@ FocusScope {
|
||||||
Launcher.HomeScreenContents {
|
Launcher.HomeScreenContents {
|
||||||
id: homeScreenContents
|
id: homeScreenContents
|
||||||
width: mainFlickable.width * 100
|
width: mainFlickable.width * 100
|
||||||
|
favoriteStrip: favoriteStrip
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue