Improved context menu items

This commit is contained in:
Abdelilah El Aissaoui 2024-06-18 01:41:47 +02:00
parent 127f2158ee
commit fc1915c801
No known key found for this signature in database
GPG Key ID: 7587FC860F594869
2 changed files with 10 additions and 2 deletions

View File

@ -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(),

View File

@ -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(