Make border and padding adjustments to some components.
This commit is contained in:
+7
-3
@@ -202,11 +202,15 @@ fun CustomListsScreen(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
) {
|
) { paddingValues ->
|
||||||
Column(
|
Column(
|
||||||
Modifier
|
Modifier
|
||||||
.padding(it)
|
.padding(
|
||||||
.fillMaxHeight(),
|
top = paddingValues.calculateTopPadding(),
|
||||||
|
bottom = paddingValues.calculateBottomPadding(),
|
||||||
|
start = 10.dp,
|
||||||
|
end = 10.dp,
|
||||||
|
).fillMaxHeight(),
|
||||||
) {
|
) {
|
||||||
HorizontalPager(state = pagerState) { page ->
|
HorizontalPager(state = pagerState) { page ->
|
||||||
when (page) {
|
when (page) {
|
||||||
|
|||||||
+20
-4
@@ -22,6 +22,7 @@ package com.vitorpamplona.amethyst.ui.screen.loggedIn.lists.followsets
|
|||||||
|
|
||||||
import androidx.activity.compose.BackHandler
|
import androidx.activity.compose.BackHandler
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.border
|
||||||
import androidx.compose.foundation.layout.Column
|
import androidx.compose.foundation.layout.Column
|
||||||
import androidx.compose.foundation.layout.Row
|
import androidx.compose.foundation.layout.Row
|
||||||
import androidx.compose.foundation.layout.Spacer
|
import androidx.compose.foundation.layout.Spacer
|
||||||
@@ -29,12 +30,14 @@ import androidx.compose.foundation.layout.consumeWindowInsets
|
|||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.imePadding
|
import androidx.compose.foundation.layout.imePadding
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.itemsIndexed
|
import androidx.compose.foundation.lazy.itemsIndexed
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Delete
|
import androidx.compose.material.icons.filled.Delete
|
||||||
|
import androidx.compose.material3.ButtonDefaults
|
||||||
import androidx.compose.material3.DropdownMenu
|
import androidx.compose.material3.DropdownMenu
|
||||||
import androidx.compose.material3.DropdownMenuItem
|
import androidx.compose.material3.DropdownMenuItem
|
||||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||||
@@ -58,6 +61,7 @@ import androidx.compose.ui.Modifier
|
|||||||
import androidx.compose.ui.res.painterResource
|
import androidx.compose.ui.res.painterResource
|
||||||
import androidx.compose.ui.text.font.FontWeight
|
import androidx.compose.ui.text.font.FontWeight
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
|
import androidx.compose.ui.unit.Dp
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.unit.sp
|
import androidx.compose.ui.unit.sp
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
@@ -72,7 +76,9 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.lists.FollowSet
|
|||||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.lists.ListVisibility
|
import com.vitorpamplona.amethyst.ui.screen.loggedIn.lists.ListVisibility
|
||||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.lists.NostrUserListFeedViewModel
|
import com.vitorpamplona.amethyst.ui.screen.loggedIn.lists.NostrUserListFeedViewModel
|
||||||
import com.vitorpamplona.amethyst.ui.screen.loggedIn.qrcode.BackButton
|
import com.vitorpamplona.amethyst.ui.screen.loggedIn.qrcode.BackButton
|
||||||
|
import com.vitorpamplona.amethyst.ui.theme.ButtonBorder
|
||||||
import com.vitorpamplona.amethyst.ui.theme.FeedPadding
|
import com.vitorpamplona.amethyst.ui.theme.FeedPadding
|
||||||
|
import com.vitorpamplona.amethyst.ui.theme.HalfPadding
|
||||||
import com.vitorpamplona.amethyst.ui.theme.StdHorzSpacer
|
import com.vitorpamplona.amethyst.ui.theme.StdHorzSpacer
|
||||||
import com.vitorpamplona.amethyst.ui.theme.StdPadding
|
import com.vitorpamplona.amethyst.ui.theme.StdPadding
|
||||||
import com.vitorpamplona.quartz.nip51Lists.peopleList.PeopleListEvent
|
import com.vitorpamplona.quartz.nip51Lists.peopleList.PeopleListEvent
|
||||||
@@ -180,8 +186,6 @@ fun FollowSetScreen(
|
|||||||
Modifier
|
Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(
|
.padding(
|
||||||
start = 10.dp,
|
|
||||||
end = 10.dp,
|
|
||||||
top = padding.calculateTopPadding(),
|
top = padding.calculateTopPadding(),
|
||||||
bottom = padding.calculateBottomPadding(),
|
bottom = padding.calculateBottomPadding(),
|
||||||
).consumeWindowInsets(padding)
|
).consumeWindowInsets(padding)
|
||||||
@@ -294,7 +298,7 @@ fun FollowSetListItem(
|
|||||||
Row {
|
Row {
|
||||||
UserCompose(
|
UserCompose(
|
||||||
user,
|
user,
|
||||||
overallModifier = StdPadding.weight(1f, fill = false),
|
overallModifier = HalfPadding.weight(1f, fill = false),
|
||||||
accountViewModel = accountViewModel,
|
accountViewModel = accountViewModel,
|
||||||
nav = nav,
|
nav = nav,
|
||||||
)
|
)
|
||||||
@@ -303,7 +307,7 @@ fun FollowSetListItem(
|
|||||||
onDeleteUser(user.pubkeyHex)
|
onDeleteUser(user.pubkeyHex)
|
||||||
},
|
},
|
||||||
modifier =
|
modifier =
|
||||||
StdPadding
|
HalfPadding
|
||||||
.align(Alignment.CenterVertically)
|
.align(Alignment.CenterVertically)
|
||||||
.background(
|
.background(
|
||||||
color = MaterialTheme.colorScheme.errorContainer,
|
color = MaterialTheme.colorScheme.errorContainer,
|
||||||
@@ -329,6 +333,17 @@ fun ListActionsMenuButton(
|
|||||||
val isActionListOpen = remember { mutableStateOf(false) }
|
val isActionListOpen = remember { mutableStateOf(false) }
|
||||||
|
|
||||||
ClickableBox(
|
ClickableBox(
|
||||||
|
modifier =
|
||||||
|
StdPadding
|
||||||
|
.size(30.dp)
|
||||||
|
.border(
|
||||||
|
width = Dp.Hairline,
|
||||||
|
color = ButtonDefaults.filledTonalButtonColors().containerColor,
|
||||||
|
shape = ButtonBorder,
|
||||||
|
).background(
|
||||||
|
color = ButtonDefaults.filledTonalButtonColors().containerColor,
|
||||||
|
shape = ButtonBorder,
|
||||||
|
),
|
||||||
onClick = { isActionListOpen.value = true },
|
onClick = { isActionListOpen.value = true },
|
||||||
) {
|
) {
|
||||||
VerticalDotsIcon()
|
VerticalDotsIcon()
|
||||||
@@ -362,6 +377,7 @@ fun ListActionsMenu(
|
|||||||
onCloseMenu()
|
onCloseMenu()
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
HorizontalDivider()
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = {
|
text = {
|
||||||
Text("Delete List")
|
Text("Delete List")
|
||||||
|
|||||||
Reference in New Issue
Block a user