From 6d3b138459db89c1864e023d18c583771fe4cfd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Thu, 24 Aug 2023 13:21:28 +0200 Subject: [PATCH] Fix shadow drawing in folders --- .../simplemobiletools/launcher/views/HomeScreenGrid.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt b/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt index 0a61d1b..63cdcf7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt +++ b/app/src/main/kotlin/com/simplemobiletools/launcher/views/HomeScreenGrid.kt @@ -469,8 +469,8 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel val folder = currentlyOpenFolder if (folder != null && folder.getItemsDrawingRect().contains( - (sideMargins.left + draggedItemCurrentCoords.first).toFloat(), - (sideMargins.top + draggedItemCurrentCoords.second).toFloat() + (draggedItemCurrentCoords.first).toFloat(), + (draggedItemCurrentCoords.second).toFloat() ) ) { val center = folder.getItemsGridCenters().minBy { @@ -1040,8 +1040,8 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel if (draggedItem != null && draggedItemCurrentCoords.first != -1 && draggedItemCurrentCoords.second != -1) { if (draggedItem!!.isSingleCellType()) { if (folder != null && folder.getItemsDrawingRect().contains( - (sideMargins.left + draggedItemCurrentCoords.first).toFloat(), - (sideMargins.top + draggedItemCurrentCoords.second).toFloat() + (draggedItemCurrentCoords.first).toFloat(), + (draggedItemCurrentCoords.second).toFloat() ) ) { @@ -1346,7 +1346,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel if (currentlyOpenFolder == null) { currentlyOpenFolder = folder.toFolder(animateOpening = true) redrawGrid() - } else if (currentlyOpenFolder?.item?.id != folder.id ){ + } else if (currentlyOpenFolder?.item?.id != folder.id) { closeFolder() } }