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 { private fun handleGridItemPopupMenu(anchorView: View, gridItem: HomeScreenGridItem, isOnAllAppsFragment: Boolean): PopupMenu {
var visibleMenuButtons = 5 var visibleMenuButtons = 5
if (gridItem.type == ITEM_TYPE_ICON) { visibleMenuButtons -= when (gridItem.type) {
visibleMenuButtons -= 1 ITEM_TYPE_ICON -> 1
} else { ITEM_TYPE_WIDGET -> 3
visibleMenuButtons -= 2 else -> 4
} }
if (isOnAllAppsFragment) { if (isOnAllAppsFragment) {