mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-04-14 10:02:02 +02:00
Fix vertical clickable area
This commit is contained in:
parent
e00f6852ed
commit
d0f361c531
@ -118,7 +118,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
|||||||
cellXCoords = ArrayList(columnCount)
|
cellXCoords = ArrayList(columnCount)
|
||||||
cellYCoords = ArrayList(rowCount)
|
cellYCoords = ArrayList(rowCount)
|
||||||
redrawWidgets = true
|
redrawWidgets = true
|
||||||
invalidate()
|
redrawGrid()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -701,9 +701,9 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
|||||||
|
|
||||||
val clickableLeft = cellXCoords[item.left] + sideMargins.left + extraXMargin
|
val clickableLeft = cellXCoords[item.left] + sideMargins.left + extraXMargin
|
||||||
val clickableTop = if (item.top == rowCount - 1) {
|
val clickableTop = if (item.top == rowCount - 1) {
|
||||||
cellYCoords[item.top] + cellHeight - iconSize - iconMargin + sideMargins.top
|
cellYCoords[item.top] + cellHeight - iconSize - iconMargin
|
||||||
} else {
|
} else {
|
||||||
cellYCoords[item.top] + sideMargins.top - iconMargin + extraYMargin
|
cellYCoords[item.top] - iconMargin + extraYMargin
|
||||||
} + sideMargins.top
|
} + sideMargins.top
|
||||||
return Rect(clickableLeft, clickableTop, clickableLeft + iconSize + 2 * iconMargin, clickableTop + iconSize + 2 * iconMargin)
|
return Rect(clickableLeft, clickableTop, clickableLeft + iconSize + 2 * iconMargin, clickableTop + iconSize + 2 * iconMargin)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user