Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

兼容夜间模式 #33

Merged
merged 5 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.ssttkkl.mahjongutils.app.components.appscaffold

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
Expand All @@ -13,6 +14,7 @@ import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.DrawerState
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ModalDrawerSheet
import androidx.compose.material3.ModalNavigationDrawer
import androidx.compose.material3.NavigationDrawerItem
Expand Down Expand Up @@ -114,7 +116,7 @@ fun AppScaffold(
TileImeHost {
if (!appState.useNavigationDrawer) {
with(Spacing.current) {
Row {
Row(Modifier.background(MaterialTheme.colorScheme.surface)) {
val menuScrollState = rememberScrollState()
ScrollBox(menuScrollState) {
Column(Modifier.width(200.dp).verticalScroll(menuScrollState)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.KeyboardArrowDown
import androidx.compose.material.icons.filled.KeyboardArrowUp
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.derivedStateOf
Expand All @@ -20,7 +21,7 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.unit.dp
import io.ssttkkl.mahjongutils.app.components.backhandler.BackHandler
import io.ssttkkl.mahjongutils.app.components.clickableButNotFocusable
Expand Down Expand Up @@ -78,7 +79,7 @@ fun TileIme(

Column(
modifier
.background(Color.LightGray.copy(alpha = 0.4f)),
.background(MaterialTheme.colorScheme.surfaceContainer),
horizontalAlignment = Alignment.CenterHorizontally
) {
headerContainer {
Expand All @@ -103,9 +104,11 @@ fun TileIme(
.size(24.dp, 24.dp)
.align(Alignment.CenterStart),
alignment = Alignment.Center,
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurface)
)

Row(Modifier.align(Alignment.CenterEnd)) {
Row(Modifier.align(Alignment.CenterEnd)
.padding(start = 8.dp)) {
Image(
painterResource(Res.drawable.icon_content_copy),
"",
Expand All @@ -116,6 +119,7 @@ fun TileIme(
}
.padding(4.dp)
.size(24.dp, 24.dp),
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurface)
)

Image(
Expand All @@ -134,6 +138,7 @@ fun TileIme(
}
.padding(4.dp)
.size(24.dp, 24.dp),
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurface)
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ private fun TileImeHostFloating(
Icon(
painterResource(Res.drawable.icon_drag_handle),
"",
Modifier.align(Alignment.Center)
Modifier.align(Alignment.Center),
tint = MaterialTheme.colorScheme.onSurface
)
}
it()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.dp
Expand All @@ -41,7 +40,7 @@ sealed class TileImeKey<T : TileImeKey<T>> : KeyboardKeyItem {
.fillMaxSize()
.padding(4.dp)
.clip(RoundedCornerShape(8.dp))
.background(Color.White)
.background(MaterialTheme.colorScheme.background)
.clickableButNotFocusable(interactionSource, onLongPress, onClick),
Alignment.Center
) {
Expand Down
3 changes: 1 addition & 2 deletions fastlane/metadata/android/en-US/short_description.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
Riichi Mahjong Calculator, supporting features such as hand
efficiency, winning hand analysis, and more.
Riichi Mahjong Calculator, featuring hand efficiency calculation, and more.
Loading