diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/drawer/DrawerContent.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/drawer/DrawerContent.kt index cf8a4752a..a9ff23ec8 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/drawer/DrawerContent.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/drawer/DrawerContent.kt @@ -25,6 +25,7 @@ import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.clickable import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.IntrinsicSize @@ -85,8 +86,6 @@ import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalFocusManager import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.LinkAnnotation -import androidx.compose.ui.text.SpanStyle -import androidx.compose.ui.text.TextLinkStyles import androidx.compose.ui.text.buildAnnotatedString import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.ImeAction @@ -123,8 +122,10 @@ import com.vitorpamplona.amethyst.ui.theme.IconRowTextModifier import com.vitorpamplona.amethyst.ui.theme.Size20Modifier import com.vitorpamplona.amethyst.ui.theme.Size22Modifier import com.vitorpamplona.amethyst.ui.theme.Size22ModifierWith4Padding +import com.vitorpamplona.amethyst.ui.theme.Size24Modifier import com.vitorpamplona.amethyst.ui.theme.Size26Modifier import com.vitorpamplona.amethyst.ui.theme.StdHorzSpacer +import com.vitorpamplona.amethyst.ui.theme.TextStyleBottomNavBar import com.vitorpamplona.amethyst.ui.theme.Width16Space import com.vitorpamplona.amethyst.ui.theme.bannerModifier import com.vitorpamplona.amethyst.ui.theme.drawerSpacing @@ -832,6 +833,7 @@ fun BottomContent( .fillMaxWidth() .padding(horizontal = 15.dp), verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.Absolute.SpaceBetween, ) { val string = remember { @@ -839,18 +841,16 @@ fun BottomContent( withLink( LinkAnnotation.Clickable( "clickable", - TextLinkStyles( - SpanStyle( - fontSize = 12.sp, - fontWeight = FontWeight.Bold, - ), - ), + TextStyleBottomNavBar, ) { nav.nav(Route.Note(BuildConfig.RELEASE_NOTES_ID)) nav.closeDrawer() }, ) { - append("v" + BuildConfig.VERSION_NAME + "-" + BuildConfig.FLAVOR.uppercase()) + append("v") + append(BuildConfig.VERSION_NAME) + append("-") + append(BuildConfig.FLAVOR.uppercase()) } } } @@ -861,7 +861,7 @@ fun BottomContent( overflow = TextOverflow.Ellipsis, maxLines = 1, ) - Box(modifier = Modifier.weight(1F)) + IconButton( onClick = { nav.nav(Route.QRDisplay(user.pubkeyHex)) @@ -871,7 +871,7 @@ fun BottomContent( Icon( painter = painterRes(R.drawable.ic_qrcode, 2), contentDescription = stringRes(id = R.string.show_npub_as_a_qr_code), - modifier = Modifier.size(24.dp), + modifier = Size24Modifier, tint = MaterialTheme.colorScheme.primary, ) } diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt index 0c641b21d..bce51df82 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/theme/Shape.kt @@ -48,9 +48,13 @@ import androidx.compose.ui.draw.shadow import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.Placeholder import androidx.compose.ui.text.PlaceholderVerticalAlign +import androidx.compose.ui.text.SpanStyle +import androidx.compose.ui.text.TextLinkStyles +import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.input.KeyboardCapitalization import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp import com.vitorpamplona.amethyst.ui.navigation.topbars.TopBarSize val Shapes = @@ -391,3 +395,11 @@ val SuggestionListDefaultHeightPage = Modifier.heightIn(0.dp, 300.dp) val FollowPackHeaderModifier = Modifier.fillMaxWidth().height(TopBarSize) val Size22ModifierWith4Padding = Modifier.size(22.dp).padding(end = 4.dp) + +val TextStyleBottomNavBar = + TextLinkStyles( + SpanStyle( + fontSize = 12.sp, + fontWeight = FontWeight.Bold, + ), + )