change theme colors some more

This commit is contained in:
izzy2lost
2025-10-23 20:17:23 -04:00
parent a2989ae45e
commit a46d74c20a
7 changed files with 272 additions and 53 deletions
@@ -15,8 +15,10 @@ import androidx.compose.animation.ExitTransition
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.Text
@@ -46,6 +48,12 @@ import com.izzy2lost.weeu.nativeinterface.NativeActiveSettings
import com.izzy2lost.weeu.nativeinterface.NativeGameTitles.Game
import com.izzy2lost.weeu.nativeinterface.NativeSettings
import com.izzy2lost.weeu.provider.DocumentsProvider
import com.izzy2lost.weeu.settings.AccountSettingsRoute
import com.izzy2lost.weeu.settings.AudioSettingsRoute
import com.izzy2lost.weeu.settings.GeneralSettingsRoute
import com.izzy2lost.weeu.settings.GraphicsSettingsRoute
import com.izzy2lost.weeu.settings.InputSettingsRoute
import com.izzy2lost.weeu.settings.OverlaySettingsRoute
import com.izzy2lost.weeu.settings.SettingsRoute
import com.izzy2lost.weeu.settings.settingsNavigation
import com.izzy2lost.weeu.titlemanager.TitleManagerRoute
@@ -92,15 +100,21 @@ private fun MainNav() {
gameListNavigation(
navController = navController,
startGame = { startGame(context, it) },
createShortcut = { createShortcutForGame(context, it) }
) {
GameListToolBarActionsMenu(
goToSettings = { navController.navigate(SettingsRoute) },
goToTitleManager = { navController.navigate(TitleManagerRoute) },
goToGraphicPacks = { navController.navigate(GraphicPacksRoute) },
goToAboutCemu = { navController.navigate(AboutCemuRoute) }
)
}
createShortcut = { createShortcutForGame(context, it) },
gameListToolBarActions = {
GameListToolBarActionsMenu(
goToTitleManager = { navController.navigate(TitleManagerRoute) },
goToGraphicPacks = { navController.navigate(GraphicPacksRoute) },
goToAboutCemu = { navController.navigate(AboutCemuRoute) }
)
},
goToGeneralSettings = { navController.navigate(GeneralSettingsRoute) },
goToInputSettings = { navController.navigate(InputSettingsRoute) },
goToGraphicsSettings = { navController.navigate(GraphicsSettingsRoute) },
goToAudioSettings = { navController.navigate(AudioSettingsRoute) },
goToOverlaySettings = { navController.navigate(OverlaySettingsRoute) },
goToAccountSettings = { navController.navigate(AccountSettingsRoute) }
)
settingsNavigation(navController)
titleManagerNavigation(navController)
graphicPacksNavigation(navController)
@@ -110,7 +124,6 @@ private fun MainNav() {
@Composable
private fun GameListToolBarActionsMenu(
goToSettings: () -> Unit,
goToTitleManager: () -> Unit,
goToGraphicPacks: () -> Unit,
goToAboutCemu: () -> Unit,
@@ -141,10 +154,6 @@ private fun GameListToolBarActionsMenu(
expanded = expandMenu,
onDismissRequest = { expandMenu = false }
) {
DropdownMenuItem(
onClick = goToSettings,
text = tr("Settings")
)
DropdownMenuItem(
onClick = goToGraphicPacks,
text = tr("Graphic packs")
@@ -18,41 +18,50 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
// Wee U brand color
// Wee U brand colors
private val WeeUCyan = Color(0xFF009ac7)
private val WeeUCyanLight = Color(0xFF33b0d5)
private val WeeUCyanDark = Color(0xFF007a9f)
private val WeeUGray = Color(0xFF8b8b8b)
private val WeeUWhite = Color(0xFFFFFFFF)
private val WeeUBlack = Color(0xFF000000)
// Dark theme with cyan background and accents
// Dark theme - black background with cyan and gray accents
private val DarkColorScheme = darkColorScheme(
primary = WeeUCyan,
onPrimary = Color.White,
primaryContainer = WeeUCyanDark,
onPrimaryContainer = Color.White,
secondary = WeeUCyanLight,
onSecondary = Color.White,
background = WeeUCyan,
onBackground = Color.White,
surface = WeeUCyan,
onSurface = Color.White,
surfaceVariant = WeeUCyanDark,
onSurfaceVariant = Color.White,
onPrimary = WeeUBlack,
primaryContainer = WeeUCyan,
onPrimaryContainer = WeeUBlack,
secondary = WeeUGray,
onSecondary = WeeUBlack,
tertiary = WeeUCyan,
onTertiary = WeeUBlack,
background = WeeUBlack,
onBackground = WeeUWhite,
surface = Color(0xFF1A1A1A),
onSurface = WeeUWhite,
surfaceVariant = Color(0xFF2A2A2A),
onSurfaceVariant = WeeUGray,
outline = WeeUGray,
outlineVariant = Color(0xFF3A3A3A),
)
// Light theme with cyan text and accents
// Light theme - white background with cyan and gray accents
private val LightColorScheme = lightColorScheme(
primary = WeeUCyan,
onPrimary = Color.White,
primaryContainer = WeeUCyanLight,
onPrimary = WeeUWhite,
primaryContainer = Color(0xFFE0F7FF),
onPrimaryContainer = WeeUCyan,
secondary = WeeUCyanDark,
onSecondary = Color.White,
background = Color.White,
onBackground = WeeUCyan,
surface = Color.White,
onSurface = WeeUCyan,
secondary = WeeUGray,
onSecondary = WeeUWhite,
tertiary = WeeUCyan,
onTertiary = WeeUWhite,
background = WeeUWhite,
onBackground = WeeUBlack,
surface = WeeUWhite,
onSurface = WeeUBlack,
surfaceVariant = Color(0xFFF5F5F5),
onSurfaceVariant = WeeUCyan,
onSurfaceVariant = WeeUGray,
outline = WeeUGray,
outlineVariant = Color(0xFFE0E0E0),
)
/**
@@ -44,6 +44,12 @@ fun NavGraphBuilder.gameListNavigation(
startGame: (NativeGameTitles.Game) -> Unit,
createShortcut: (NativeGameTitles.Game) -> Unit,
gameListToolBarActions: @Composable (RowScope.() -> Unit),
goToGeneralSettings: () -> Unit,
goToInputSettings: () -> Unit,
goToGraphicsSettings: () -> Unit,
goToAudioSettings: () -> Unit,
goToOverlaySettings: () -> Unit,
goToAccountSettings: () -> Unit,
) {
navigation<GameListRoute>(startDestination = GameListRoutes.GamesRoute) {
composable<GameListRoutes.GamesRoute> { backStackEntry ->
@@ -59,7 +65,13 @@ fun NavGraphBuilder.gameListNavigation(
gameViewModel.game = game
navController.navigate(GameListRoutes.GameDetailsRoute)
},
toolbarActions = gameListToolBarActions
toolbarActions = gameListToolBarActions,
goToGeneralSettings = goToGeneralSettings,
goToInputSettings = goToInputSettings,
goToGraphicsSettings = goToGraphicsSettings,
goToAudioSettings = goToAudioSettings,
goToOverlaySettings = goToOverlaySettings,
goToAccountSettings = goToAccountSettings
)
}
composableGameScreen<GameListRoutes.GameDetailsRoute>(navController) { game ->
@@ -1,14 +1,19 @@
@file:OptIn(
ExperimentalMaterial3Api::class, ExperimentalFoundationApi::class,
ExperimentalMaterial3ExpressiveApi::class,
)
package com.izzy2lost.weeu.gamelist
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
import androidx.compose.foundation.background
import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxSize
@@ -19,14 +24,27 @@ import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.foundation.lazy.grid.items
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.AccountCircle
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.Gamepad
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.GraphicEq
import androidx.compose.material.icons.filled.Headphones
import androidx.compose.material.icons.filled.Layers
import androidx.compose.material.icons.filled.Settings
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Checkbox
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.FloatingActionButtonMenu
import androidx.compose.material3.FloatingActionButtonMenuItem
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.ToggleFloatingActionButton
import androidx.compose.material3.ToggleFloatingActionButtonDefaults
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.Text
@@ -38,6 +56,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
@@ -47,6 +66,8 @@ import androidx.compose.runtime.setValue
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.vector.rememberVectorPainter
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
@@ -71,6 +92,12 @@ fun GamesListScreen(
startGame: (Game) -> Unit,
createShortcut: (Game) -> Unit,
toolbarActions: @Composable RowScope.() -> Unit,
goToGeneralSettings: () -> Unit,
goToInputSettings: () -> Unit,
goToGraphicsSettings: () -> Unit,
goToAudioSettings: () -> Unit,
goToOverlaySettings: () -> Unit,
goToAccountSettings: () -> Unit,
) {
val lifecycleOwner = LocalLifecycleOwner.current
val lifecycleState by lifecycleOwner.lifecycle.currentStateFlow.collectAsState()
@@ -79,9 +106,12 @@ fun GamesListScreen(
val snackbarHostState = remember { SnackbarHostState() }
val gameSearchQuery by gameListViewModel.filterText.collectAsStateWithLifecycle()
val games by gameListViewModel.games.collectAsStateWithLifecycle()
var fabExpanded by rememberSaveable { mutableStateOf(false) }
val state = rememberPullToRefreshState()
BackHandler(fabExpanded) { fabExpanded = false }
LaunchedEffect(lifecycleState) {
if (lifecycleState == Lifecycle.State.RESUMED && gameListViewModel.gamePathsHaveChanged())
gameListViewModel.refreshGames()
@@ -103,6 +133,18 @@ fun GamesListScreen(
onValueChange = gameListViewModel::setFilterText
)
},
floatingActionButton = {
SettingsFabMenu(
expanded = fabExpanded,
onExpandChange = { fabExpanded = it },
goToGeneralSettings = goToGeneralSettings,
goToInputSettings = goToInputSettings,
goToGraphicsSettings = goToGraphicsSettings,
goToAudioSettings = goToAudioSettings,
goToOverlaySettings = goToOverlaySettings,
goToAccountSettings = goToAccountSettings
)
}
) { scaffoldPadding ->
Box(
modifier = Modifier
@@ -290,6 +332,84 @@ private fun GameListItem(
}
}
@Composable
private fun SettingsFabMenu(
expanded: Boolean,
onExpandChange: (Boolean) -> Unit,
goToGeneralSettings: () -> Unit,
goToInputSettings: () -> Unit,
goToGraphicsSettings: () -> Unit,
goToAudioSettings: () -> Unit,
goToOverlaySettings: () -> Unit,
goToAccountSettings: () -> Unit,
) {
FloatingActionButtonMenu(
expanded = expanded,
button = {
ToggleFloatingActionButton(
checked = expanded,
onCheckedChange = { onExpandChange(!expanded) }
) {
Icon(
imageVector = if (expanded) Icons.Filled.Close else Icons.Filled.Settings,
contentDescription = tr("Settings")
)
}
}
) {
val textColor = if (isSystemInDarkTheme()) Color.White else Color.Black
FloatingActionButtonMenuItem(
onClick = {
goToGeneralSettings()
onExpandChange(false)
},
icon = { Icon(Icons.Filled.Settings, contentDescription = null, tint = textColor) },
text = { Text(tr("General"), color = textColor) }
)
FloatingActionButtonMenuItem(
onClick = {
goToInputSettings()
onExpandChange(false)
},
icon = { Icon(Icons.Filled.Gamepad, contentDescription = null, tint = textColor) },
text = { Text(tr("Input"), color = textColor) }
)
FloatingActionButtonMenuItem(
onClick = {
goToGraphicsSettings()
onExpandChange(false)
},
icon = { Icon(Icons.Filled.GraphicEq, contentDescription = null, tint = textColor) },
text = { Text(tr("Graphics"), color = textColor) }
)
FloatingActionButtonMenuItem(
onClick = {
goToAudioSettings()
onExpandChange(false)
},
icon = { Icon(Icons.Filled.Headphones, contentDescription = null, tint = textColor) },
text = { Text(tr("Audio"), color = textColor) }
)
FloatingActionButtonMenuItem(
onClick = {
goToOverlaySettings()
onExpandChange(false)
},
icon = { Icon(Icons.Filled.Layers, contentDescription = null, tint = textColor) },
text = { Text(tr("Overlay"), color = textColor) }
)
FloatingActionButtonMenuItem(
onClick = {
goToAccountSettings()
onExpandChange(false)
},
icon = { Icon(Icons.Filled.AccountCircle, contentDescription = null, tint = textColor) },
text = { Text(tr("Account"), color = textColor) }
)
}
}
@Composable
private fun GameContextMenu(
expanded: Boolean,
@@ -21,6 +21,24 @@ import kotlinx.serialization.Serializable
@Serializable
object SettingsRoute
@Serializable
object GeneralSettingsRoute
@Serializable
object InputSettingsRoute
@Serializable
object AudioSettingsRoute
@Serializable
object GraphicsSettingsRoute
@Serializable
object OverlaySettingsRoute
@Serializable
object AccountSettingsRoute
private object SettingsRoutes {
@Serializable
object GeneralSettings
@@ -29,7 +47,10 @@ private object SettingsRoutes {
object GeneralSettingsScreenRoute
@Serializable
object InputSettingsRoute
object InputSettingsRouteInternal
@Serializable
object InputSettingsScreenRoute
@Serializable
object SettingsHomeScreenRoute
@@ -49,9 +70,6 @@ private object SettingsRoutes {
@Serializable
object OverlaySettingsScreenRoute
@Serializable
object InputSettingsScreenRoute
@Serializable
data class ControllerInputSettingsScreenRoute(val index: Int)
@@ -68,20 +86,33 @@ fun NavGraphBuilder.settingsNavigation(navController: NavHostController) {
SettingsHomeScreen(
navigateBack = { navController.popBackStack() },
actions = SettingsHomeScreenActions(
goToGeneralSettings = { navController.navigate(SettingsRoutes.GeneralSettings) },
goToInputSettings = { navController.navigate(SettingsRoutes.InputSettingsRoute) },
goToGraphicsSettings = { navController.navigate(SettingsRoutes.GraphicsSettingsScreenRoute) },
goToAudioSettings = { navController.navigate(SettingsRoutes.AudioSettingsScreenRoute) },
goToOverlaySettings = { navController.navigate(SettingsRoutes.OverlaySettingsScreenRoute) },
goToAccountSettings = { navController.navigate(SettingsRoutes.AccountSettingsScreenRoute) }
goToGeneralSettings = { navController.navigate(GeneralSettingsRoute) },
goToInputSettings = { navController.navigate(InputSettingsRoute) },
goToGraphicsSettings = { navController.navigate(GraphicsSettingsRoute) },
goToAudioSettings = { navController.navigate(AudioSettingsRoute) },
goToOverlaySettings = { navController.navigate(OverlaySettingsRoute) },
goToAccountSettings = { navController.navigate(AccountSettingsRoute) }
)
)
}
composable<AudioSettingsRoute> {
AudioSettingsScreen(
navigateBack = { navController.popBackStack() },
)
}
composable<SettingsRoutes.AudioSettingsScreenRoute> {
AudioSettingsScreen(
navigateBack = { navController.popBackStack() },
)
}
composable<GraphicsSettingsRoute> {
GraphicsSettingsScreen(
navigateBack = { navController.popBackStack() },
goToCustomDriversSettings = {
navController.navigate(SettingsRoutes.CustomDriversScreenRoute)
}
)
}
composable<SettingsRoutes.GraphicsSettingsScreenRoute> {
GraphicsSettingsScreen(
navigateBack = { navController.popBackStack() },
@@ -95,12 +126,39 @@ fun NavGraphBuilder.settingsNavigation(navController: NavHostController) {
navigateBack = { navController.popBackStack() },
)
}
composable<OverlaySettingsRoute> {
OverlaySettingsScreen(
navigateBack = { navController.popBackStack() },
)
}
composable<SettingsRoutes.OverlaySettingsScreenRoute> {
OverlaySettingsScreen(
navigateBack = { navController.popBackStack() },
)
}
navigation<SettingsRoutes.InputSettingsRoute>(startDestination = SettingsRoutes.InputSettingsScreenRoute) {
composable<AccountSettingsRoute> {
AccountSettingsScreen(
navigateBack = { navController.popBackStack() },
)
}
composable<InputSettingsRoute> {
InputSettingsScreen(
navigateBack = { navController.popBackStack() },
actions = InputSettingsScreenActions(
goToInputOverlaySettings = {
navController.navigate(SettingsRoutes.InputOverlaySettingsScreenRoute)
},
goToControllerSettings = { controllerIndex ->
navController.navigate(
SettingsRoutes.ControllerInputSettingsScreenRoute(
controllerIndex
)
)
},
)
)
}
navigation<SettingsRoutes.InputSettingsRouteInternal>(startDestination = SettingsRoutes.InputSettingsScreenRoute) {
composable<SettingsRoutes.ControllerInputSettingsScreenRoute> { navBackStackEntry ->
val controllerIndex =
navBackStackEntry.toRoute<SettingsRoutes.ControllerInputSettingsScreenRoute>().index
@@ -132,6 +190,12 @@ fun NavGraphBuilder.settingsNavigation(navController: NavHostController) {
)
}
}
composable<GeneralSettingsRoute> {
GeneralSettingsScreen(
navigateBack = { navController.popBackStack() },
goToGamePathsSettings = { navController.navigate(SettingsRoutes.GamePathsScreenRoute) }
)
}
navigation<SettingsRoutes.GeneralSettings>(startDestination = SettingsRoutes.GeneralSettingsScreenRoute) {
composable<SettingsRoutes.GeneralSettingsScreenRoute> {
GeneralSettingsScreen(
@@ -151,5 +215,10 @@ fun NavGraphBuilder.settingsNavigation(navController: NavHostController) {
navigateBack = { navController.popBackStack() },
)
}
composable<SettingsRoutes.AccountSettingsScreenRoute> {
AccountSettingsScreen(
navigateBack = { navController.popBackStack() },
)
}
}
}
+1 -1
View File
@@ -7,7 +7,7 @@ kotlin = "2.2.10"
androidx-core-ktx = "1.17.0"
androidx-activity-compose = "1.10.1"
androidx-compose-bom = "2025.08.00"
androidx-compose-material3 = "1.4.0-beta01"
androidx-compose-material3 = "1.4.0-alpha01"
androidx-compose-material3-adaptive = "1.1.0"
google-android-material = "1.12.0"
androidx-navigation-compose = "2.9.3"
+1 -1
View File
@@ -178,7 +178,7 @@ XMLConfigParser CemuConfig::Load(XMLConfigParser& parser)
notification.text_scale = notification_node.get("TextScale", 100);
notification.controller_profiles = notification_node.get("ControllerProfiles", true);
notification.controller_battery = notification_node.get("ControllerBattery", false);
notification.shader_compiling = notification_node.get("ShaderCompiling", true);
notification.shader_compiling = notification_node.get("ShaderCompiling", false);
notification.friends = notification_node.get("FriendService", true);
}