Skip to content

Commit

Permalink
Tweak theming a little bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
msimonides committed Mar 16, 2024
1 parent 2682ab0 commit 14e4675
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
Expand Down Expand Up @@ -115,7 +117,10 @@ private fun SettingsTopBar(toolbarTitle: String?, onBack: () -> Unit) {
) {
Icon(Icons.AutoMirrored.Filled.ArrowBack, contentDescription = null) // TODO: contentDescription
}
}
},
colors = TopAppBarDefaults.topAppBarColors(
containerColor = MaterialTheme.colorScheme.background
),
)
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private val RedStop = Color(0xffc31e1e)
private val DarkColorScheme = darkColorScheme(
primary = HomerGreen,
onPrimary = Color.White,
background = Color.Black
background = Color.Black,
)

private val ExtendedDarkColors = ExtendedColors(
Expand All @@ -83,6 +83,7 @@ private val ExtendedDarkColors = ExtendedColors(
private val LightColorScheme = lightColorScheme(
primary = HomerGreen,
onPrimary = Color.White,
background = Color.White,

/* Other default colors to override
background = Color(0xFFFFFBFE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@

package com.studio4plus.homerplayer2.kiosk

import android.graphics.Color
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
Expand All @@ -46,6 +49,7 @@ class MainActivity : ComponentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge(statusBarStyle = SystemBarStyle.dark(Color.TRANSPARENT))
setContent {
KioskSetupUi()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,22 @@

package com.studio4plus.homerplayer2.kiosk.ui

import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import com.studio4plus.homerplayer2.base.ui.theme.HomerPlayer2Theme

@Composable
fun KioskSetupUi() {
HomerPlayer2Theme {
HomerPlayer2Theme(
setWindowColors = false
) {
// A surface container using the 'background' color from the theme
Surface(
color = MaterialTheme.colorScheme.background
color = MaterialTheme.colorScheme.background,
modifier = Modifier.navigationBarsPadding()
) {
MainScreenRoute()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Button
Expand Down Expand Up @@ -92,7 +93,7 @@ fun MainScreen(
.padding(bottom = HomerTheme.dimensions.screenContentPadding)
) {
Image(
painterResource(BaseR.drawable.app_icon_player_foreground),
painterResource(BaseR.drawable.app_icon_setup_foreground),
contentDescription = null,
contentScale = ContentScale.FillHeight,
modifier = Modifier
Expand Down

0 comments on commit 14e4675

Please sign in to comment.