mirror of
				https://github.com/SimpleMobileTools/Simple-Launcher.git
				synced 2025-06-05 21:59:15 +02:00 
			
		
		
		
	Prevent resizing widgets over bottom row
This commit is contained in:
		| @@ -218,10 +218,14 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel | |||||||
|                 item.left = cellsRect.left |                 item.left = cellsRect.left | ||||||
|                 item.top = cellsRect.top |                 item.top = cellsRect.top | ||||||
|                 item.right = cellsRect.right |                 item.right = cellsRect.right | ||||||
|                 item.bottom = cellsRect.bottom |                 item.bottom = if (cellsRect.bottom > rowCount - 2) { | ||||||
|  |                     rowCount - 2 | ||||||
|  |                 } else { | ||||||
|  |                     cellsRect.bottom | ||||||
|  |                 } | ||||||
|                 updateWidgetPositionAndSize(widgetView, item) |                 updateWidgetPositionAndSize(widgetView, item) | ||||||
|                 ensureBackgroundThread { |                 ensureBackgroundThread { | ||||||
|                     context.homeScreenGridItemsDB.updateItemPosition(cellsRect.left, cellsRect.top, cellsRect.right, cellsRect.bottom, item.id!!) |                     context.homeScreenGridItemsDB.updateItemPosition(item.left, item.top, item.right, item.bottom, item.id!!) | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user