Background opaque for FABs
This commit is contained in:
parent
aaff6c0f98
commit
373eed0b0e
1 changed files with 6 additions and 4 deletions
|
|
@ -910,7 +910,8 @@ fun MainScreenWithDrawer(
|
|||
refreshTrigeer++
|
||||
sharedScreenModel.loadNewSong("$midiFile")
|
||||
},
|
||||
icon = if (isExpanded) Icons.Filled.Close else Icons.Filled.Menu
|
||||
icon = if (isExpanded) Icons.Filled.Close else Icons.Filled.Menu,
|
||||
isOpaque = false
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -1340,18 +1341,19 @@ private fun getIntervalToC(key: String): Int {
|
|||
private fun MyFAB(
|
||||
onClick: () -> Unit,
|
||||
size: Dp = 55.dp,
|
||||
icon: ImageVector
|
||||
icon: ImageVector,
|
||||
isOpaque: Boolean = true
|
||||
) {
|
||||
FloatingActionButton(
|
||||
onClick = onClick,
|
||||
modifier = Modifier.size(size!!),
|
||||
containerColor = MaterialTheme.colorScheme.onSecondary.copy(alpha = 0.1f),
|
||||
containerColor = MaterialTheme.colorScheme.onSecondary.copy(alpha = if(isOpaque) 0.95f else 0.2f),
|
||||
elevation = FloatingActionButtonDefaults.elevation(0.dp, 0.dp, 0.dp, 0.dp)
|
||||
) {
|
||||
Icon(
|
||||
imageVector = icon,
|
||||
contentDescription = "FAB ${icon.name}",
|
||||
tint = MaterialTheme.colorScheme.primary
|
||||
tint = MaterialTheme.colorScheme.primary.copy(alpha = 0.9f)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue