From b2812648d3ac838e046a934af57a2d10314118ae Mon Sep 17 00:00:00 2001 From: Abdelilah El Aissaoui Date: Wed, 19 Oct 2022 23:17:36 +0200 Subject: [PATCH] Fixed welcome page buttons colors in light theme --- .../kotlin/com/jetpackduba/gitnuro/App.kt | 20 ++++++++----------- .../com/jetpackduba/gitnuro/ui/WelcomePage.kt | 4 ++-- .../ui/components/RepositoriesTabPanel.kt | 1 - 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/App.kt b/src/main/kotlin/com/jetpackduba/gitnuro/App.kt index 32263cf..30d5818 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/App.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/App.kt @@ -194,24 +194,20 @@ class App { verticalAlignment = Alignment.CenterVertically, ) { RepositoriesTabPanel( - modifier = Modifier - .weight(1f), tabs = tabsInformationList, selectedTabKey = selectedTabKey.value, onTabSelected = { newSelectedTabKey -> - println("New selected tab key $newSelectedTabKey") selectedTabKey.value = newSelectedTabKey }, - newTabContent = { key -> - val newAppTab = newAppTab( - key = key - ) - - onAddedTab(newAppTab) - newAppTab - }, onTabClosed = onRemoveTab - ) + ) { key -> + val newAppTab = newAppTab( + key = key + ) + + onAddedTab(newAppTab) + newAppTab + } } } diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/ui/WelcomePage.kt b/src/main/kotlin/com/jetpackduba/gitnuro/ui/WelcomePage.kt index 96a3eb3..6840ebd 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/ui/WelcomePage.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/ui/WelcomePage.kt @@ -271,14 +271,14 @@ fun ButtonTile( .size(24.dp), painter = painter, contentDescription = null, - colorFilter = ColorFilter.tint(MaterialTheme.colors.onBackground), + colorFilter = ColorFilter.tint(MaterialTheme.colors.onPrimary), ) Text( text = title, maxLines = 1, style = MaterialTheme.typography.body1, - color = MaterialTheme.colors.onBackground, + color = MaterialTheme.colors.onPrimary, ) } } diff --git a/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt b/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt index eb5d1e6..f41316d 100644 --- a/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt +++ b/src/main/kotlin/com/jetpackduba/gitnuro/ui/components/RepositoriesTabPanel.kt @@ -40,7 +40,6 @@ import kotlin.io.path.name @Composable fun RepositoriesTabPanel( - modifier: Modifier = Modifier, tabs: List, selectedTabKey: Int, onTabSelected: (Int) -> Unit,