dm-142
This commit is contained in:
parent
841017e1a4
commit
ffea7138b5
1 changed files with 6 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
package com.example.login_v3.home.Message.UI.Detail.Message_Component
|
package com.example.login_v3.home.Message.UI.Detail.Message_Component
|
||||||
|
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.border
|
||||||
import androidx.compose.foundation.clickable
|
import androidx.compose.foundation.clickable
|
||||||
import androidx.compose.foundation.gestures.detectTransformGestures
|
import androidx.compose.foundation.gestures.detectTransformGestures
|
||||||
import androidx.compose.foundation.layout.Box
|
import androidx.compose.foundation.layout.Box
|
||||||
|
|
@ -99,6 +100,8 @@ fun ImageLightbox(
|
||||||
) {
|
) {
|
||||||
// 包裹 IconButton 與 DropdownMenu 的小容器
|
// 包裹 IconButton 與 DropdownMenu 的小容器
|
||||||
Box(modifier = Modifier.wrapContentSize()) {
|
Box(modifier = Modifier.wrapContentSize()) {
|
||||||
|
|
||||||
|
|
||||||
IconButton(
|
IconButton(
|
||||||
onClick = { menuExpanded = true }, // 點擊開啟選單
|
onClick = { menuExpanded = true }, // 點擊開啟選單
|
||||||
modifier = Modifier.background(
|
modifier = Modifier.background(
|
||||||
|
|
@ -116,7 +119,9 @@ fun ImageLightbox(
|
||||||
// Material 3 下拉選單
|
// Material 3 下拉選單
|
||||||
DropdownMenu(
|
DropdownMenu(
|
||||||
expanded = menuExpanded,
|
expanded = menuExpanded,
|
||||||
onDismissRequest = { menuExpanded = false }
|
onDismissRequest = { menuExpanded = false },
|
||||||
|
containerColor = MaterialTheme.colorScheme.primary,
|
||||||
|
modifier = Modifier.border(0.5.dp, Color.White.copy(alpha = 0.3f))
|
||||||
) {
|
) {
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
text = {
|
text = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue