refactor: route GameListItem and install overlay colors through the theme - #68
Closed
LeGeRyChEeSe wants to merge 3 commits into
Closed
Conversation
Third slice of the appearance-customization feature (docs/sonnet5-specs/02), built on feat/appearance-settings-screen (extends the same screen, not just feat/appearance-data-and-theme as the doc's PR table suggests - the Agencement section belongs on the screen PR2 already introduced). - AppearanceLayout.kt (new): cardCornerShape(CardCorner) and Density.spacingFactor() pure mappings. ROUNDED (12.dp) and COMFORTABLE (1x) match the original hardcoded values exactly, so defaults are unchanged. - GameListItem.kt: card shape and outer vertical margin now read LocalAppearance instead of a hardcoded RoundedCornerShape(12.dp)/4.dp. - MainActivity.kt: CatalogLayout.AUTO preserves the existing maxWidth > 800.dp heuristic; LIST/GRID force the outcome. List/grid contentPadding and grid item spacing scale with the density factor. - AppearanceScreen.kt: three new FilterChip rows (Density, Card Corners, Catalog View) under the existing sections. Mode (light/system) and background style remain deferred, per PR2's scope note.
Lot 1/4 of the hardcoded-color migration (docs/sonnet5-specs/02 §6), built on feat/appearance-layout-controls. Structural surfaces only (top bar, drawer, Scaffold background): - CustomTopBar: Surface background, all icon tints, sort dropdown item text, search field colors/placeholder/icons, and the shared labelColor/containerColor across every filter chip now read MaterialTheme.colorScheme instead of hardcoded Color(0xFF121212)/ Color.White/Color.Gray/Color.Black. - The two chips whose selected background is the actual accent (All, Local Installs) now use onSecondary for their selected text/icon instead of a hardcoded Color.Black, so a dark custom accent doesn't produce unreadable text. - ModalDrawerSheet background/content color, drawer title, version text, divider, and the unselected nav item colors now read the theme. - Scaffold containerColor: Color.Black -> colorScheme.background. Deliberately NOT touched (semantic, independent of theme, per doc): the monetization tier badge colors, and the per-filter status colors (New=red, Favorites=gold, Installed=blue, Downloaded=green, Updates=yellow) together with their matching selected text/icon color. All defaults are unchanged (colorScheme resolves to the exact same hex values as before for the default AppearanceSettings), so this is a no-visible-diff refactor until the user picks a non-default accent.
…heme Lot 2/4 of the hardcoded-color migration (docs/sonnet5-specs/02 §6), built on refactor/theme-hardcoded-colors-lot1. GameListItem.kt: card container/border, icon placeholder background/ border, game name, size/download-label text, unfavorited star tint, expanded divider, description surface/text now read MaterialTheme.colorScheme instead of Color(0xFF121212)/Color(0xFF1E1E1E)/ Color.Black/Color.White/Color.Gray/Color.LightGray. MainActivity.kt install-related overlays (SyncingOverlay, LoadingScreen, ErrorScreen, InstallationOverlay, BottomQueueBar): same treatment for backgrounds, borders and neutral text/icon colors. ErrorScreen's 'Try Again' button text was hardcoded Color.White on a colorScheme.secondary background - same latent contrast bug as lot 1's filter chips, fixed with onSecondary. Deliberately NOT touched (semantic status/danger colors, per doc): favorite-star gold, downloaded/ready/installed green-blue-red version badges, permission-warning red, delete/uninstall red, paused-state gray on progress indicators, and the sync-failure card's fixed dark red (kept exact to avoid a default-look diff, since it doesn't match colorScheme.error's dark-theme value). Defaults unchanged for the same reason as lot 1: colorScheme resolves to the original hardcoded hex values (or an indistinguishably close one - 0x1A1A1A vs 0x1E1E1E) with default AppearanceSettings.
LeGeRyChEeSe
force-pushed
the
refactor/theme-hardcoded-colors-lot1
branch
from
July 24, 2026 11:52
fa40d7e to
e949216
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objectif
Lot 2/4 de la migration des couleurs codées en dur (
docs/sonnet5-specs/02-feature-appearance-customization.md§6) :GameListItem+ overlays d'installation. Dépend derefactor/theme-hardcoded-colors-lot1(#67).Changements
GameListItem.kt: conteneur/bordure de la carte, fond/bordure du placeholder d'icône, nom du jeu, texte taille/bouton téléchargement, teinte de l'étoile non-favorite, séparateur en mode étendu, fond/texte de la description lisent maintenantMaterialTheme.colorSchemeau lieu deColor(0xFF121212)/Color(0xFF1E1E1E)/Color.Black/Color.White/Color.Gray/Color.LightGray.MainActivity.kt(overlays d'installation :SyncingOverlay,LoadingScreen,ErrorScreen,InstallationOverlay,BottomQueueBar) : même traitement pour fonds, bordures et couleurs de texte/icônes neutres. Le bouton "Try Again" deErrorScreenavait un texteColor.Whitecodé en dur sur un fondcolorScheme.secondary— même bug de contraste latent que les filter chips du lot 1, corrigé aveconSecondary.Volontairement non touché (couleurs sémantiques de statut/danger, cf. doc)
Or de l'étoile favorite, badges vert/bleu/rouge de version (téléchargé/prêt/installé), rouge d'avertissement permission, rouge suppression/désinstallation, gris de l'état "en pause" sur les indicateurs de progression, et le rouge fixe de la carte d'échec de synchronisation (gardé exact pour éviter un écart visuel par défaut, car il ne correspond pas à la valeur dark-theme de
colorScheme.error).Vérification
scripts\gradlew.bat :app:assembleDevDebug→ succès.scripts\gradlew.bat :app:testDevDebugUnitTest→ succès (suite existante, aucune régression).Pixel_7,com.vrhub.debug) : lancement à froid sans crash, écran d'erreur catalogue vide affiché correctement avec l'accent Violet (bouton "Try Again" lisible), logcat propre.Comme pour le lot 1, avec les réglages par défaut
colorSchemerésout aux mêmes valeurs hexadécimales qu'avant (ou une valeur visuellement indissociable,0x1A1A1Avs0x1E1E1E) — aucun changement visuel par défaut.Réf :
docs/sonnet5-specs/02-feature-appearance-customization.md§6 (Lot 2/4)