mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-15 07:28:30 +00:00
Fix sticker management top app bar menu padding.
This commit is contained in:
committed by
Cody Henthorne
parent
971bcf4f41
commit
76f65198bb
@@ -10,7 +10,6 @@ import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.combinedClickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
@@ -19,7 +18,6 @@ import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.fillMaxHeight
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.widthIn
|
||||
import androidx.compose.foundation.layout.wrapContentHeight
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
@@ -331,11 +329,7 @@ private fun TopAppBar(
|
||||
DropdownMenus.Menu(
|
||||
controller = menuController,
|
||||
offsetX = 24.dp,
|
||||
offsetY = 0.dp,
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 16.dp)
|
||||
.widthIn(min = 200.dp)
|
||||
.background(SignalTheme.colors.colorSurface2)
|
||||
offsetY = 0.dp
|
||||
) {
|
||||
DropdownMenus.Item(
|
||||
text = {
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
|
||||
package org.signal.core.ui.compose
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.ColumnScope
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.widthIn
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.DropdownMenuItem
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
@@ -22,6 +24,7 @@ import androidx.compose.ui.unit.DpOffset
|
||||
import androidx.compose.ui.unit.dp
|
||||
import org.signal.core.ui.R
|
||||
import org.signal.core.ui.compose.copied.androidx.compose.material3.DropdownMenu
|
||||
import org.signal.core.ui.compose.theme.SignalTheme
|
||||
|
||||
/**
|
||||
* Properly styled dropdown menus and items.
|
||||
@@ -32,8 +35,8 @@ object DropdownMenus {
|
||||
*/
|
||||
@Composable
|
||||
fun Menu(
|
||||
controller: MenuController = remember { MenuController() },
|
||||
modifier: Modifier = Modifier,
|
||||
controller: MenuController = remember { MenuController() },
|
||||
offsetX: Dp = dimensionResource(id = R.dimen.gutter),
|
||||
offsetY: Dp = 0.dp,
|
||||
content: @Composable ColumnScope.(MenuController) -> Unit
|
||||
@@ -48,6 +51,8 @@ object DropdownMenus {
|
||||
),
|
||||
content = { content(controller) },
|
||||
modifier = modifier
|
||||
.background(SignalTheme.colors.colorSurface2)
|
||||
.widthIn(min = 220.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -57,10 +62,10 @@ object DropdownMenus {
|
||||
*/
|
||||
@Composable
|
||||
fun Item(
|
||||
modifier: Modifier = Modifier,
|
||||
contentPadding: PaddingValues = PaddingValues(horizontal = 16.dp),
|
||||
text: @Composable () -> Unit,
|
||||
onClick: () -> Unit,
|
||||
modifier: Modifier = Modifier
|
||||
onClick: () -> Unit
|
||||
) {
|
||||
DropdownMenuItem(
|
||||
contentPadding = contentPadding,
|
||||
|
||||
Reference in New Issue
Block a user