Skip to content

Commit

Permalink
💄 Update ui
Browse files Browse the repository at this point in the history
  • Loading branch information
yhs0602 committed Oct 2, 2023
1 parent 83e196a commit d75c5ce
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/src/main/java/com/kyhsgeekcode/disassembler/ui/FileDrawer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -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)
}
Expand Down

0 comments on commit d75c5ce

Please sign in to comment.