From bf31f5d6799a9b427cbcea0150e48eafd761532f Mon Sep 17 00:00:00 2001 From: fscarponi Date: Fri, 1 Dec 2023 10:51:43 +0100 Subject: [PATCH] #260 TreeElementSelection appearance for last and first element of selection --- .../org/jetbrains/jewel/foundation/lazy/tree/BasicLazyTree.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/BasicLazyTree.kt b/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/BasicLazyTree.kt index 932641286..e89aa8f67 100644 --- a/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/BasicLazyTree.kt +++ b/foundation/src/main/kotlin/org/jetbrains/jewel/foundation/lazy/tree/BasicLazyTree.kt @@ -152,10 +152,10 @@ public fun BasicLazyTree( val backgroundShape by derivedStateOf { val hasRoundedTopCorners = flattenedTree.getOrNull(index - 1)?.id?.let { it !in treeState.delegate.selectedKeys - } ?: false + } ?: true val hasRoundedBottomCorners = flattenedTree.getOrNull(index + 1)?.id?.let { it !in treeState.delegate.selectedKeys - } ?: false + } ?: true val topCornerSize = computerCornerSize(hasRoundedTopCorners, elementBackgroundCornerSize) val bottomCornerSize = computerCornerSize(hasRoundedBottomCorners, elementBackgroundCornerSize) RoundedCornerShape(