mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-27 17:49:16 +03:00
Make Compose overflow menu feel slightly more like XML version
This commit is contained in:
parent
ad75d137b0
commit
a446b37c1f
1 changed files with 8 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
package eu.kanade.presentation.components
|
||||
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.widthIn
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.MoreVert
|
||||
import androidx.compose.material3.DropdownMenu
|
||||
|
@ -14,9 +15,12 @@ import androidx.compose.runtime.getValue
|
|||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import eu.kanade.tachiyomi.R
|
||||
|
||||
@Composable
|
||||
|
@ -68,6 +72,7 @@ fun AppBarActions(
|
|||
}
|
||||
|
||||
DropdownMenu(
|
||||
modifier = Modifier.widthIn(min = 200.dp),
|
||||
expanded = showMenu,
|
||||
onDismissRequest = { showMenu = false },
|
||||
) {
|
||||
|
@ -77,15 +82,15 @@ fun AppBarActions(
|
|||
it.onClick()
|
||||
showMenu = false
|
||||
},
|
||||
text = { Text(it.title) },
|
||||
text = { Text(it.title, fontWeight = FontWeight.Normal) },
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
object AppBar {
|
||||
interface AppBarAction
|
||||
sealed interface AppBar {
|
||||
sealed interface AppBarAction
|
||||
|
||||
data class Action(
|
||||
val title: String,
|
||||
|
|
Loading…
Reference in a new issue