Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material.ExperimentalMaterialApi
Expand Down Expand Up @@ -332,7 +331,6 @@ fun LibraryScreen(
}
}
},
modifier = Modifier.systemBarsPadding(),
)
},
bottomBar = {
Expand All @@ -349,13 +347,11 @@ fun LibraryScreen(
},
modifier =
Modifier
.systemBarsPadding()
.fillMaxSize(),
content = { innerPadding ->
Box(
modifier =
Modifier
.padding(innerPadding)
.pullRefresh(pullRefreshState)
.fillMaxSize(),
) {
Expand All @@ -371,7 +367,13 @@ fun LibraryScreen(
totalItems = libraryCount,
ignoreItems = listOf("recent_books", "library_title"),
),
contentPadding = PaddingValues(horizontal = 16.dp),
contentPadding =
PaddingValues(
start = 16.dp,
end = 16.dp,
top = innerPadding.calculateTopPadding(),
bottom = innerPadding.calculateBottomPadding(),
),
) {
item(key = "recent_books") {
val showRecent = isRecentVisible()
Expand Down Expand Up @@ -487,7 +489,10 @@ fun LibraryScreen(
refreshing = pullRefreshing,
state = pullRefreshState,
contentColor = colorScheme.primary,
modifier = Modifier.align(Alignment.TopCenter),
modifier =
Modifier
.align(Alignment.TopCenter)
.padding(top = innerPadding.calculateTopPadding()),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
Expand Down Expand Up @@ -100,6 +101,7 @@ fun MiniPlayerComposable(
modifier =
Modifier
.fillMaxSize()
.navigationBarsPadding()
.padding(horizontal = 12.dp),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically,
Expand Down Expand Up @@ -130,6 +132,7 @@ fun MiniPlayerComposable(
.fillMaxWidth()
.background(colorScheme.background)
.clickable { navController.showPlayer(book.id, book.title, book.subtitle) }
.navigationBarsPadding()
.padding(horizontal = 20.dp, vertical = 8.dp),
verticalAlignment = Alignment.CenterVertically,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.KeyboardOptions
Expand Down Expand Up @@ -119,7 +118,6 @@ fun LoginScreen(
Scaffold(
modifier =
Modifier
.systemBarsPadding()
.fillMaxSize(),
content = { innerPadding ->
Box(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.layout.width
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.ArrowBack
Expand Down Expand Up @@ -242,7 +241,6 @@ fun PlayerScreen(
}
}
},
modifier = Modifier.systemBarsPadding(),
content = { innerPadding ->
Column(
modifier =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fun NavigationBarComposable(

Surface(
shadowElevation = 4.dp,
modifier = modifier.height(64.dp),
modifier = modifier,
) {
NavigationBar(
containerColor = Color.Transparent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fun NavigationBarPlaceholderComposable(
) {
Surface(
shadowElevation = 4.dp,
modifier = modifier.height(64.dp),
modifier = modifier,
) {
NavigationBar(
containerColor = Color.Transparent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
Expand Down Expand Up @@ -78,7 +77,6 @@ fun SettingsScreen(
},
modifier =
Modifier
.systemBarsPadding()
.fillMaxHeight(),
content = { innerPadding ->
Column(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
Expand Down Expand Up @@ -85,7 +84,6 @@ fun AdvancedSettingsComposable(
},
modifier =
Modifier
.systemBarsPadding()
.fillMaxHeight(),
content = { innerPadding ->
Column(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.foundation.lazy.rememberLazyListState
Expand Down Expand Up @@ -76,7 +75,6 @@ fun CustomHeadersSettingsScreen(onBack: () -> Unit) {
},
modifier =
Modifier
.systemBarsPadding()
.fillMaxHeight(),
content = { innerPadding ->
LazyColumn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.foundation.lazy.rememberLazyListState
Expand Down Expand Up @@ -93,7 +92,6 @@ fun LocalUrlSettingsScreen(onBack: () -> Unit) {
},
modifier =
Modifier
.systemBarsPadding()
.fillMaxHeight(),
content = { innerPadding ->
LazyColumn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
Expand Down Expand Up @@ -73,7 +72,6 @@ fun SeekSettingsScreen(onBack: () -> Unit) {
},
modifier =
Modifier
.systemBarsPadding()
.fillMaxHeight(),
content = { innerPadding ->
Column(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
Expand Down Expand Up @@ -66,7 +65,6 @@ fun CacheSettingsScreen(
},
modifier =
Modifier
.systemBarsPadding()
.fillMaxHeight(),
content = { innerPadding ->
Column(
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/kotlin/org/grakovne/lissen/ui/theme/Theme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ fun LissenTheme(

SideEffect {
window?.let {
WindowCompat.getInsetsController(it, view).isAppearanceLightStatusBars = !isDarkTheme
val insetsController = WindowCompat.getInsetsController(it, view)
insetsController.isAppearanceLightStatusBars = !isDarkTheme
insetsController.isAppearanceLightNavigationBars = !isDarkTheme
}
}

Expand Down