dark mode-v13
This commit is contained in:
parent
98b78c598a
commit
29ee1d1e3f
3 changed files with 20 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
|||
package com.example.login_v3.home.setting.setting_detail_page.detail_UI
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
|
|
@ -8,6 +10,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
|||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.selection.selectable
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.RadioButton
|
||||
import androidx.compose.material3.Text
|
||||
|
|
@ -16,6 +19,8 @@ import androidx.compose.runtime.collectAsState
|
|||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.blur
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
import com.example.login_v3.home.setting.setting_detail_page.viewmodel.Theme_ViewModel
|
||||
import com.example.login_v3.ui.theme.AppTheme
|
||||
|
|
@ -31,6 +36,17 @@ fun setting_theme_page(
|
|||
modifier = Modifier
|
||||
.padding(10.dp)
|
||||
) {
|
||||
//glass effect
|
||||
Box(modifier = Modifier.matchParentSize().blur(10.dp))
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.matchParentSize()
|
||||
.background(Color.White.copy(alpha = 0.08f), RoundedCornerShape(16.dp))
|
||||
.border(1.dp, Color.White.copy(alpha = 0.3f), RoundedCornerShape(16.dp))
|
||||
)
|
||||
|
||||
|
||||
//dark light mode
|
||||
Column(modifier = Modifier.padding(16.dp)) {
|
||||
Text(
|
||||
text = "主題設定",
|
||||
|
|
|
|||
|
|
@ -13,4 +13,5 @@ val Pink40 = Color(0xFF7D5260)
|
|||
val main_orange = Color(0xFFFF6700)
|
||||
val light_orange = Color(0xFFFFAD00)
|
||||
|
||||
val WhiteGlass = Color(0x14FFFFFF)
|
||||
val WhiteGlass = Color(0x14FFFFFF)
|
||||
val DarkGlass = Color(0x14FFFFFF)
|
||||
|
|
@ -12,13 +12,13 @@ import androidx.compose.runtime.Composable
|
|||
import androidx.compose.ui.platform.LocalContext
|
||||
|
||||
private val DarkColorScheme = darkColorScheme(
|
||||
primary = WhiteGlass,
|
||||
primary = DarkGlass,
|
||||
secondary = light_orange,
|
||||
tertiary = Pink80
|
||||
)
|
||||
|
||||
private val LightColorScheme = lightColorScheme(
|
||||
primary = main_orange,
|
||||
primary = WhiteGlass,
|
||||
secondary = light_orange,
|
||||
tertiary = Pink40
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue