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