diff --git a/buildSrc/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/buildSrc/src/main/kotlin/Dependencies.kt index e655d43b..8c80ca9c 100644 --- a/buildSrc/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/buildSrc/src/main/kotlin/Dependencies.kt @@ -1,6 +1,6 @@ object Dependencies { - val odyssey = "1.0.0" + val odyssey = "1.0.1" val odysseyPackage = "io.github.alexgladkov" val compileSdk = 33 diff --git a/common/common-sample/src/commonMain/kotlin/ru/alexgladkov/common/compose/tabs/BottomConfiguration.kt b/common/common-sample/src/commonMain/kotlin/ru/alexgladkov/common/compose/tabs/BottomConfiguration.kt index e39375bc..ce0b0700 100644 --- a/common/common-sample/src/commonMain/kotlin/ru/alexgladkov/common/compose/tabs/BottomConfiguration.kt +++ b/common/common-sample/src/commonMain/kotlin/ru/alexgladkov/common/compose/tabs/BottomConfiguration.kt @@ -1,6 +1,7 @@ package ru.alexgladkov.common.compose.tabs import androidx.compose.runtime.Composable +import androidx.compose.ui.unit.dp import ru.alexgladkov.common.compose.theme.Odyssey import ru.alexgladkov.odyssey.compose.navigation.RootComposeBuilder import ru.alexgladkov.odyssey.compose.navigation.bottom_bar_navigation.* @@ -13,7 +14,8 @@ class BottomConfiguration : TabsNavModel() { return BottomNavConfiguration( backgroundColor = Odyssey.color.secondaryBackground, selectedColor = Odyssey.color.primaryText, - unselectedColor = Odyssey.color.controlColor + unselectedColor = Odyssey.color.controlColor, + elevation = 0.dp ) } } diff --git a/desktop/build.gradle.kts b/desktop/build.gradle.kts index e7cf45fd..75813cc7 100644 --- a/desktop/build.gradle.kts +++ b/desktop/build.gradle.kts @@ -35,7 +35,7 @@ kotlin { compose.desktop { application { - mainClass = "ru.alexgladkov.odyssey-demo.Main_DesktopKt" + mainClass = "ru.alexgladkov.odyssey-demo.Main_desktopKt" nativeDistributions { targetFormats( diff --git a/documentation/GETTING_STARTED.md b/documentation/GETTING_STARTED.md index 2d05cb25..8e609bbf 100644 --- a/documentation/GETTING_STARTED.md +++ b/documentation/GETTING_STARTED.md @@ -4,8 +4,8 @@ Add dependencies to gradle ```kotlin named("commonMain") { dependencies { - implementation("io.github.alexgladkov:odyssey-core:1.0.0") // For core classes - implementation("io.github.alexgladkov:odyssey-compose:1.0.0") // For compose extensions + implementation("io.github.alexgladkov:odyssey-core:1.0.1") // For core classes + implementation("io.github.alexgladkov:odyssey-compose:1.0.1") // For compose extensions } } ``` \ No newline at end of file diff --git a/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/RootController.kt b/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/RootController.kt index aeb774cd..9ced3e4d 100644 --- a/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/RootController.kt +++ b/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/RootController.kt @@ -469,6 +469,7 @@ open class RootController( ) rootController.setDeepLinkUri(_deepLinkUri) + rootController.parentRootController = parentRootController _childrenRootController.add(rootController) val screen = Screen( diff --git a/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/base/BottomBarNavigator.kt b/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/base/BottomBarNavigator.kt index a06c3e62..0fbb0397 100644 --- a/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/base/BottomBarNavigator.kt +++ b/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/base/BottomBarNavigator.kt @@ -58,7 +58,8 @@ fun BottomBarNavigator(startScreen: String?) { TabNavigator(modifier = Modifier.weight(1f), startScreen, tabItem.value) BottomNavigation( - backgroundColor = bottomNavConfiguration.backgroundColor + backgroundColor = bottomNavConfiguration.backgroundColor, + elevation = bottomNavConfiguration.elevation ) { rootController.tabItems.forEach { currentItem -> val configuration = currentItem.tabInfo.tabItem.configuration diff --git a/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/navigation/bottom_bar_navigation/BottomNavConfiguration.kt b/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/navigation/bottom_bar_navigation/BottomNavConfiguration.kt index b9fff277..269090af 100644 --- a/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/navigation/bottom_bar_navigation/BottomNavConfiguration.kt +++ b/odyssey/odyssey-compose/src/commonMain/kotlin/ru/alexgladkov/odyssey/compose/navigation/bottom_bar_navigation/BottomNavConfiguration.kt @@ -2,6 +2,8 @@ package ru.alexgladkov.odyssey.compose.navigation.bottom_bar_navigation import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp /** * Abstract class needed to configure bottom bar navigation @@ -25,11 +27,13 @@ abstract class TabsNavModel { * @param backgroundColor - bar background color * @param selectedColor - tint color for selected tab * @param unselectedColor - tint color for unselected tab + * @param elevation - shadow control for bottom navigation */ data class BottomNavConfiguration( val backgroundColor: Color, val selectedColor: Color, - val unselectedColor: Color + val unselectedColor: Color, + val elevation: Dp = 8.dp, ) : TabsNavConfiguration { override val type = TabsNavType.Bottom }