mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-02-16 19:40:41 +01:00
Adjust widgets drawing for missing bottom row
This commit is contained in:
parent
ec45fc0a1f
commit
b49a84968e
@ -695,9 +695,11 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
||||
rect.left -= diff
|
||||
}
|
||||
|
||||
// do not allow placing widgets at the bottom row, that is for pinned default apps
|
||||
if (rect.bottom >= context.config.homeRowCount - 1) {
|
||||
val diff = rect.bottom - context.config.homeRowCount + 2
|
||||
if (rect.top < 0) {
|
||||
rect.bottom -= rect.top
|
||||
rect.top = 0
|
||||
} else if (rect.bottom > context.config.homeRowCount - 1) {
|
||||
val diff = rect.bottom - context.config.homeColumnCount + 1
|
||||
rect.bottom -= diff
|
||||
rect.top -= diff
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user