Skip to content

Commit

Permalink
Merge branch 'rc/release-1.0.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gladkov committed Oct 24, 2022
2 parents 4d68ed9 + 6f54d4e commit 5546219
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion buildSrc/buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
object Dependencies {

val odyssey = "1.0.0"
val odyssey = "1.0.1"
val odysseyPackage = "io.github.alexgladkov"

val compileSdk = 33
Expand Down
Original file line number Diff line number Diff line change
@@ -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.*
Expand All @@ -13,7 +14,8 @@ class BottomConfiguration : TabsNavModel<BottomNavConfiguration>() {
return BottomNavConfiguration(
backgroundColor = Odyssey.color.secondaryBackground,
selectedColor = Odyssey.color.primaryText,
unselectedColor = Odyssey.color.controlColor
unselectedColor = Odyssey.color.controlColor,
elevation = 0.dp
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ kotlin {

compose.desktop {
application {
mainClass = "ru.alexgladkov.odyssey-demo.Main_DesktopKt"
mainClass = "ru.alexgladkov.odyssey-demo.Main_desktopKt"

nativeDistributions {
targetFormats(
Expand Down
4 changes: 2 additions & 2 deletions documentation/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ open class RootController(
)

rootController.setDeepLinkUri(_deepLinkUri)
rootController.parentRootController = parentRootController
_childrenRootController.add(rootController)

val screen = Screen(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,11 +27,13 @@ abstract class TabsNavModel<Cfg : TabsNavConfiguration> {
* @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
}
Expand Down

0 comments on commit 5546219

Please sign in to comment.