Commit 5b77af48 authored by Marco Martin's avatar Marco Martin

grid as big as icons

parent fd2531d1
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment