correcting some menu offsets

This commit is contained in:
tibbi 2022-10-16 23:28:15 +02:00
parent c5f329358a
commit 464adc7309
1 changed files with 4 additions and 4 deletions

View File

@ -486,10 +486,10 @@ class MainActivity : SimpleActivity(), FlingListener {
private fun handleGridItemPopupMenu(anchorView: View, gridItem: HomeScreenGridItem, isOnAllAppsFragment: Boolean): PopupMenu {
var visibleMenuButtons = 5
if (gridItem.type == ITEM_TYPE_ICON) {
visibleMenuButtons -= 1
} else {
visibleMenuButtons -= 2
visibleMenuButtons -= when (gridItem.type) {
ITEM_TYPE_ICON -> 1
ITEM_TYPE_WIDGET -> 3
else -> 4
}
if (isOnAllAppsFragment) {