mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-02-16 19:40:41 +01: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)
|
||||
cellYCoords = ArrayList(rowCount)
|
||||
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 clickableTop = if (item.top == rowCount - 1) {
|
||||
cellYCoords[item.top] + cellHeight - iconSize - iconMargin + sideMargins.top
|
||||
cellYCoords[item.top] + cellHeight - iconSize - iconMargin
|
||||
} else {
|
||||
cellYCoords[item.top] + sideMargins.top - iconMargin + extraYMargin
|
||||
cellYCoords[item.top] - iconMargin + extraYMargin
|
||||
} + sideMargins.top
|
||||
return Rect(clickableLeft, clickableTop, clickableLeft + iconSize + 2 * iconMargin, clickableTop + iconSize + 2 * iconMargin)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user