mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-08-04 02:34:45 +00:00
grid as big as icons
This commit is contained in:
parent
fd2531d19a
commit
5b77af489e
2 changed files with 9 additions and 4 deletions
|
|
@ -32,6 +32,7 @@ import org.kde.phone.homescreen 1.0
|
||||||
LauncherContainer {
|
LauncherContainer {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
readonly property int columns: Math.floor(root.flow.width / cellWidth)
|
||||||
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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,7 @@ Item {
|
||||||
PlasmaComponents.ScrollBar.vertical: PlasmaComponents.ScrollBar {
|
PlasmaComponents.ScrollBar.vertical: PlasmaComponents.ScrollBar {
|
||||||
id: scrollabr
|
id: scrollabr
|
||||||
opacity: mainFlickable.moving
|
opacity: mainFlickable.moving
|
||||||
|
interactive: false
|
||||||
Behavior on opacity {
|
Behavior on opacity {
|
||||||
OpacityAnimator {
|
OpacityAnimator {
|
||||||
duration: units.longDuration * 2
|
duration: units.longDuration * 2
|
||||||
|
|
@ -229,6 +230,9 @@ Item {
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
|
cellWidth: Math.floor(width / launcher.columns)
|
||||||
|
cellHeight: launcher.cellHeight
|
||||||
|
|
||||||
configKey: width > height ? "ItemGeometriesHorizontal" : "ItemGeometriesVertical"
|
configKey: width > height ? "ItemGeometriesHorizontal" : "ItemGeometriesVertical"
|
||||||
containment: plasmoid
|
containment: plasmoid
|
||||||
editModeCondition: plasmoid.immutable
|
editModeCondition: plasmoid.immutable
|
||||||
|
|
@ -244,8 +248,8 @@ Item {
|
||||||
defaultItemWidth: units.gridUnit * 6
|
defaultItemWidth: units.gridUnit * 6
|
||||||
defaultItemHeight: defaultItemWidth
|
defaultItemHeight: defaultItemWidth
|
||||||
|
|
||||||
cellWidth: units.iconSizes.small
|
//cellWidth: units.iconSizes.small
|
||||||
cellHeight: cellWidth
|
//cellHeight: cellWidth
|
||||||
|
|
||||||
acceptsAppletCallback: function(applet, x, y) {
|
acceptsAppletCallback: function(applet, x, y) {
|
||||||
print("Applet: "+applet+" "+x+" "+y)
|
print("Applet: "+applet+" "+x+" "+y)
|
||||||
|
|
@ -257,10 +261,10 @@ Item {
|
||||||
configOverlayComponent: ConfigOverlay {}
|
configOverlayComponent: ConfigOverlay {}
|
||||||
|
|
||||||
onEditModeChanged: {
|
onEditModeChanged: {
|
||||||
launcherDragManager.active = editMode;
|
launcherDragManager.active = dragActive || editMode;
|
||||||
}
|
}
|
||||||
onDragActiveChanged: {
|
onDragActiveChanged: {
|
||||||
launcherDragManager.active = dragActive;
|
launcherDragManager.active = dragActive || editMode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue