mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +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 {
|
||||
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 cellHeight: availableCellHeight
|
||||
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ Item {
|
|||
PlasmaComponents.ScrollBar.vertical: PlasmaComponents.ScrollBar {
|
||||
id: scrollabr
|
||||
opacity: mainFlickable.moving
|
||||
interactive: false
|
||||
Behavior on opacity {
|
||||
OpacityAnimator {
|
||||
duration: units.longDuration * 2
|
||||
|
|
@ -229,6 +230,9 @@ Item {
|
|||
|
||||
anchors.fill: parent
|
||||
|
||||
cellWidth: Math.floor(width / launcher.columns)
|
||||
cellHeight: launcher.cellHeight
|
||||
|
||||
configKey: width > height ? "ItemGeometriesHorizontal" : "ItemGeometriesVertical"
|
||||
containment: plasmoid
|
||||
editModeCondition: plasmoid.immutable
|
||||
|
|
@ -244,8 +248,8 @@ Item {
|
|||
defaultItemWidth: units.gridUnit * 6
|
||||
defaultItemHeight: defaultItemWidth
|
||||
|
||||
cellWidth: units.iconSizes.small
|
||||
cellHeight: cellWidth
|
||||
//cellWidth: units.iconSizes.small
|
||||
//cellHeight: cellWidth
|
||||
|
||||
acceptsAppletCallback: function(applet, x, y) {
|
||||
print("Applet: "+applet+" "+x+" "+y)
|
||||
|
|
@ -257,10 +261,10 @@ Item {
|
|||
configOverlayComponent: ConfigOverlay {}
|
||||
|
||||
onEditModeChanged: {
|
||||
launcherDragManager.active = editMode;
|
||||
launcherDragManager.active = dragActive || editMode;
|
||||
}
|
||||
onDragActiveChanged: {
|
||||
launcherDragManager.active = dragActive;
|
||||
launcherDragManager.active = dragActive || editMode;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue