Improved context menu items
This commit is contained in:
parent
127f2158ee
commit
fc1915c801
@ -246,10 +246,14 @@ fun TextEntry(contextTextEntry: ContextMenuElement.ContextTextEntry, onDismissRe
|
|||||||
contextTextEntry.onClick()
|
contextTextEntry.onClick()
|
||||||
}
|
}
|
||||||
.pointerHoverIcon(PointerIcon.Default)
|
.pointerHoverIcon(PointerIcon.Default)
|
||||||
.padding(horizontal = 16.dp, vertical = 4.dp),
|
.padding(horizontal = 8.dp, vertical = 8.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
Box(modifier = Modifier.size(24.dp).padding(end = 8.dp)) {
|
Box(
|
||||||
|
modifier = Modifier
|
||||||
|
.padding(end = 8.dp)
|
||||||
|
.size(16.dp)
|
||||||
|
) {
|
||||||
if (icon != null) {
|
if (icon != null) {
|
||||||
Icon(
|
Icon(
|
||||||
painter = icon(),
|
painter = icon(),
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package com.jetpackduba.gitnuro.ui.context_menu
|
package com.jetpackduba.gitnuro.ui.context_menu
|
||||||
|
|
||||||
|
import androidx.compose.ui.res.painterResource
|
||||||
|
import com.jetpackduba.gitnuro.AppIcons
|
||||||
|
|
||||||
fun pushContextMenuItems(
|
fun pushContextMenuItems(
|
||||||
onPushWithTags: () -> Unit,
|
onPushWithTags: () -> Unit,
|
||||||
onForcePush: () -> Unit,
|
onForcePush: () -> Unit,
|
||||||
@ -7,6 +10,7 @@ fun pushContextMenuItems(
|
|||||||
return mutableListOf(
|
return mutableListOf(
|
||||||
ContextMenuElement.ContextTextEntry(
|
ContextMenuElement.ContextTextEntry(
|
||||||
label = "Push including tags",
|
label = "Push including tags",
|
||||||
|
icon = { painterResource(AppIcons.TAG) },
|
||||||
onClick = onPushWithTags,
|
onClick = onPushWithTags,
|
||||||
),
|
),
|
||||||
ContextMenuElement.ContextTextEntry(
|
ContextMenuElement.ContextTextEntry(
|
||||||
|
Loading…
Reference in New Issue
Block a user