From d75c5ce9d948ee89c00d257393b611ba53488623 Mon Sep 17 00:00:00 2001 From: yhs0602 Date: Mon, 2 Oct 2023 23:50:10 +0900 Subject: [PATCH] :lipstick: Update ui --- .../com/kyhsgeekcode/disassembler/ui/FileDrawer.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/kyhsgeekcode/disassembler/ui/FileDrawer.kt b/app/src/main/java/com/kyhsgeekcode/disassembler/ui/FileDrawer.kt index 24bb50ee..cc69344d 100644 --- a/app/src/main/java/com/kyhsgeekcode/disassembler/ui/FileDrawer.kt +++ b/app/src/main/java/com/kyhsgeekcode/disassembler/ui/FileDrawer.kt @@ -15,6 +15,7 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.Refresh import androidx.compose.material3.Icon import androidx.compose.material3.IconButton +import androidx.compose.material3.LocalContentColor import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState @@ -81,9 +82,10 @@ private fun FileDrawerItemRow( ), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(1.dp) ) { + val expandable = node.isExpandable() Icon( painter = painterResource( - id = if (node.isExpandable()) { + id = if (expandable) { if (expanded) { android.R.drawable.arrow_up_float } else { @@ -98,10 +100,12 @@ private fun FileDrawerItemRow( tint = Color.Gray ) Icon( - painter = painterResource(id = R.drawable.ic_folder_icon), + painter = painterResource( + id = R.drawable.ic_folder_icon + ), contentDescription = "Folder", Modifier.width(20.dp), - tint = Color(0xFF7F00FF) + tint = if (expandable) Color(0xFF7F00FF) else LocalContentColor.current ) Text(text = node.caption) }