From d3702c21e253b619d4b83a2a75ae7d6260d0dec8 Mon Sep 17 00:00:00 2001 From: fscarponi Date: Mon, 4 Dec 2023 16:17:51 +0100 Subject: [PATCH] review. --- .../panels/packages/PackageSearchSearchBar.kt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/packages/PackageSearchSearchBar.kt b/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/packages/PackageSearchSearchBar.kt index e5d8d741..3379b748 100644 --- a/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/packages/PackageSearchSearchBar.kt +++ b/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/packages/PackageSearchSearchBar.kt @@ -127,23 +127,24 @@ fun PackageSearchGlobalColors(): GlobalColors { @Composable internal fun PackageSearchTreeStyle(): LazyTreeStyle { - val paddings = LocalLazyTreeStyle.current.metrics.elementPadding + val currentStyle = LocalLazyTreeStyle.current + val paddings = currentStyle.metrics.elementPadding return LazyTreeStyle( - LocalLazyTreeStyle.current.colors, + currentStyle.colors, metrics = LazyTreeMetrics( - indentSize = LocalLazyTreeStyle.current.metrics.indentSize, + indentSize = currentStyle.metrics.indentSize, elementPadding = PaddingValues( top = paddings.calculateTopPadding(), bottom = paddings.calculateBottomPadding(), start = paddings.calculateStartPadding(LocalLayoutDirection.current), end = 0.dp ), - elementContentPadding = LocalLazyTreeStyle.current.metrics.elementContentPadding, - elementMinHeight = LocalLazyTreeStyle.current.metrics.elementMinHeight, - chevronContentGap = LocalLazyTreeStyle.current.metrics.chevronContentGap, - elementBackgroundCornerSize = LocalLazyTreeStyle.current.metrics.elementBackgroundCornerSize, + elementContentPadding = currentStyle.metrics.elementContentPadding, + elementMinHeight = currentStyle.metrics.elementMinHeight, + chevronContentGap = currentStyle.metrics.chevronContentGap, + elementBackgroundCornerSize = currentStyle.metrics.elementBackgroundCornerSize, ), - LocalLazyTreeStyle.current.icons, + currentStyle.icons, ) }