mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
Remove expect/actual insets
This commit is contained in:
@@ -18,8 +18,10 @@ import androidx.compose.foundation.layout.fillMaxHeight
|
|||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.itemsIndexed
|
import androidx.compose.foundation.lazy.itemsIndexed
|
||||||
@@ -54,8 +56,6 @@ import ca.gosyer.jui.ui.main.components.bottomNav
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import com.vanpra.composematerialdialogs.rememberMaterialDialogState
|
import com.vanpra.composematerialdialogs.rememberMaterialDialogState
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ import androidx.compose.foundation.layout.fillMaxHeight
|
|||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
@@ -63,8 +65,6 @@ import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
|||||||
import ca.gosyer.jui.uicore.components.mangaAspectRatio
|
import ca.gosyer.jui.uicore.components.mangaAspectRatio
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
|
|||||||
@@ -20,9 +20,11 @@ import androidx.compose.foundation.layout.fillMaxHeight
|
|||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
@@ -66,8 +68,6 @@ import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
|||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import com.vanpra.composematerialdialogs.MaterialDialog
|
import com.vanpra.composematerialdialogs.MaterialDialog
|
||||||
import com.vanpra.composematerialdialogs.MaterialDialogState
|
import com.vanpra.composematerialdialogs.MaterialDialogState
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.requiredHeight
|
import androidx.compose.foundation.layout.requiredHeight
|
||||||
@@ -37,7 +38,6 @@ import ca.gosyer.jui.uicore.components.MangaListItemTitle
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|||||||
@@ -19,8 +19,10 @@ import androidx.compose.foundation.layout.WindowInsets
|
|||||||
import androidx.compose.foundation.layout.WindowInsetsSides
|
import androidx.compose.foundation.layout.WindowInsetsSides
|
||||||
import androidx.compose.foundation.layout.add
|
import androidx.compose.foundation.layout.add
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.pager.PagerState
|
import androidx.compose.foundation.pager.PagerState
|
||||||
import androidx.compose.foundation.pager.rememberPagerState
|
import androidx.compose.foundation.pager.rememberPagerState
|
||||||
@@ -52,8 +54,6 @@ import ca.gosyer.jui.ui.library.settings.LibrarySheet
|
|||||||
import ca.gosyer.jui.ui.library.settings.LibrarySideMenu
|
import ca.gosyer.jui.ui.library.settings.LibrarySideMenu
|
||||||
import ca.gosyer.jui.uicore.components.ErrorScreen
|
import ca.gosyer.jui.uicore.components.ErrorScreen
|
||||||
import ca.gosyer.jui.uicore.components.LoadingScreen
|
import ca.gosyer.jui.uicore.components.LoadingScreen
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import androidx.compose.foundation.layout.aspectRatio
|
|||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
@@ -41,7 +42,6 @@ import ca.gosyer.jui.uicore.components.mangaAspectRatio
|
|||||||
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import androidx.compose.foundation.layout.aspectRatio
|
|||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
@@ -45,7 +46,6 @@ import ca.gosyer.jui.uicore.components.mangaAspectRatio
|
|||||||
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|
||||||
expect fun Modifier.libraryMangaModifier(
|
expect fun Modifier.libraryMangaModifier(
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import androidx.compose.foundation.layout.aspectRatio
|
|||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
@@ -37,7 +38,6 @@ import ca.gosyer.jui.uicore.components.mangaAspectRatio
|
|||||||
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import androidx.compose.foundation.layout.WindowInsets
|
|||||||
import androidx.compose.foundation.layout.WindowInsetsSides
|
import androidx.compose.foundation.layout.WindowInsetsSides
|
||||||
import androidx.compose.foundation.layout.consumeWindowInsets
|
import androidx.compose.foundation.layout.consumeWindowInsets
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
@@ -36,7 +37,6 @@ import ca.gosyer.jui.ui.base.navigation.DisplayController
|
|||||||
import ca.gosyer.jui.ui.base.navigation.withDisplayController
|
import ca.gosyer.jui.ui.base.navigation.withDisplayController
|
||||||
import ca.gosyer.jui.ui.main.components.SideMenu
|
import ca.gosyer.jui.ui.main.components.SideMenu
|
||||||
import ca.gosyer.jui.ui.main.components.WithBottomNav
|
import ca.gosyer.jui.ui.main.components.WithBottomNav
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import cafe.adriel.voyager.navigator.Navigator
|
import cafe.adriel.voyager.navigator.Navigator
|
||||||
import cafe.adriel.voyager.transitions.FadeTransition
|
import cafe.adriel.voyager.transitions.FadeTransition
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
|
|||||||
@@ -19,9 +19,11 @@ import androidx.compose.foundation.layout.fillMaxHeight
|
|||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
@@ -52,8 +54,6 @@ import ca.gosyer.jui.ui.main.components.bottomNav
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import ca.gosyer.jui.uicore.resources.toPainter
|
import ca.gosyer.jui.uicore.resources.toPainter
|
||||||
import com.google.accompanist.flowlayout.FlowMainAxisAlignment
|
import com.google.accompanist.flowlayout.FlowMainAxisAlignment
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
import androidx.compose.material.Scaffold
|
import androidx.compose.material.Scaffold
|
||||||
@@ -30,8 +32,6 @@ import ca.gosyer.jui.uicore.components.LoadingScreen
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import com.mikepenz.aboutlibraries.Libs
|
import com.mikepenz.aboutlibraries.Libs
|
||||||
import com.mikepenz.aboutlibraries.ui.compose.Libraries
|
import com.mikepenz.aboutlibraries.ui.compose.Libraries
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import androidx.compose.foundation.layout.WindowInsetsSides
|
|||||||
import androidx.compose.foundation.layout.defaultMinSize
|
import androidx.compose.foundation.layout.defaultMinSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.selection.selectableGroup
|
import androidx.compose.foundation.selection.selectableGroup
|
||||||
@@ -41,7 +42,6 @@ import androidx.compose.ui.unit.Dp
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.compose.ui.util.fastForEach
|
import androidx.compose.ui.util.fastForEach
|
||||||
import ca.gosyer.jui.ui.main.TopLevelMenus
|
import ca.gosyer.jui.ui.main.TopLevelMenus
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import cafe.adriel.voyager.navigator.Navigator
|
import cafe.adriel.voyager.navigator.Navigator
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
|||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.systemBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
@@ -39,7 +40,6 @@ import ca.gosyer.jui.presentation.build.BuildKonfig
|
|||||||
import ca.gosyer.jui.ui.base.navigation.DisplayController
|
import ca.gosyer.jui.ui.base.navigation.DisplayController
|
||||||
import ca.gosyer.jui.ui.main.MoreMenus
|
import ca.gosyer.jui.ui.main.MoreMenus
|
||||||
import ca.gosyer.jui.ui.main.TopLevelMenus
|
import ca.gosyer.jui.ui.main.TopLevelMenus
|
||||||
import ca.gosyer.jui.uicore.insets.systemBars
|
|
||||||
import cafe.adriel.voyager.navigator.Navigator
|
import cafe.adriel.voyager.navigator.Navigator
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|||||||
@@ -20,9 +20,11 @@ import androidx.compose.foundation.layout.fillMaxHeight
|
|||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
@@ -44,8 +46,6 @@ import ca.gosyer.jui.ui.main.components.bottomNav
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import ca.gosyer.jui.uicore.resources.toPainter
|
import ca.gosyer.jui.uicore.resources.toPainter
|
||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
|
|||||||
@@ -15,8 +15,10 @@ import androidx.compose.foundation.layout.fillMaxHeight
|
|||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
@@ -73,8 +75,6 @@ import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
|||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.icons.JuiAssets
|
import ca.gosyer.jui.uicore.icons.JuiAssets
|
||||||
import ca.gosyer.jui.uicore.icons.juiassets.DonePrev
|
import ca.gosyer.jui.uicore.icons.juiassets.DonePrev
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
import com.vanpra.composematerialdialogs.rememberMaterialDialogState
|
import com.vanpra.composematerialdialogs.rememberMaterialDialogState
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
@@ -38,8 +40,6 @@ import ca.gosyer.jui.ui.viewModel
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import ca.gosyer.jui.uicore.vm.ContextWrapper
|
import ca.gosyer.jui.uicore.vm.ContextWrapper
|
||||||
|
|||||||
@@ -24,9 +24,11 @@ import androidx.compose.foundation.layout.fillMaxHeight
|
|||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
@@ -73,8 +75,6 @@ import ca.gosyer.jui.uicore.components.mangaAspectRatio
|
|||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.components.secondaryItemAlpha
|
import ca.gosyer.jui.uicore.components.secondaryItemAlpha
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import ca.gosyer.jui.uicore.theme.ExtraColors
|
import ca.gosyer.jui.uicore.theme.ExtraColors
|
||||||
|
|||||||
@@ -13,9 +13,11 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
@@ -57,8 +59,6 @@ import ca.gosyer.jui.ui.viewModel
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import ca.gosyer.jui.uicore.vm.ContextWrapper
|
import ca.gosyer.jui.uicore.vm.ContextWrapper
|
||||||
import ca.gosyer.jui.uicore.vm.ViewModel
|
import ca.gosyer.jui.uicore.vm.ViewModel
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
@@ -28,8 +30,6 @@ import ca.gosyer.jui.ui.main.components.bottomNav
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import cafe.adriel.voyager.core.screen.Screen
|
import cafe.adriel.voyager.core.screen.Screen
|
||||||
import cafe.adriel.voyager.core.screen.ScreenKey
|
import cafe.adriel.voyager.core.screen.ScreenKey
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
@@ -28,8 +30,6 @@ import ca.gosyer.jui.ui.main.components.bottomNav
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import cafe.adriel.voyager.core.screen.Screen
|
import cafe.adriel.voyager.core.screen.Screen
|
||||||
import cafe.adriel.voyager.core.screen.ScreenKey
|
import cafe.adriel.voyager.core.screen.ScreenKey
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
@@ -40,8 +42,6 @@ import ca.gosyer.jui.ui.viewModel
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
||||||
import ca.gosyer.jui.uicore.resources.readTextAsync
|
import ca.gosyer.jui.uicore.resources.readTextAsync
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
@@ -54,7 +54,6 @@ import kotlinx.collections.immutable.ImmutableMap
|
|||||||
import kotlinx.collections.immutable.persistentMapOf
|
import kotlinx.collections.immutable.persistentMapOf
|
||||||
import kotlinx.collections.immutable.toImmutableMap
|
import kotlinx.collections.immutable.toImmutableMap
|
||||||
import kotlinx.datetime.Clock
|
import kotlinx.datetime.Clock
|
||||||
import kotlinx.serialization.decodeFromString
|
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.JsonObject
|
import kotlinx.serialization.json.JsonObject
|
||||||
import kotlinx.serialization.json.jsonArray
|
import kotlinx.serialization.json.jsonArray
|
||||||
|
|||||||
@@ -18,8 +18,10 @@ import androidx.compose.foundation.layout.fillMaxHeight
|
|||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
@@ -53,8 +55,6 @@ import ca.gosyer.jui.ui.viewModel
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import ca.gosyer.jui.uicore.vm.ContextWrapper
|
import ca.gosyer.jui.uicore.vm.ContextWrapper
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
@@ -28,8 +30,6 @@ import ca.gosyer.jui.ui.main.components.bottomNav
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import cafe.adriel.voyager.core.screen.Screen
|
import cafe.adriel.voyager.core.screen.Screen
|
||||||
import cafe.adriel.voyager.core.screen.ScreenKey
|
import cafe.adriel.voyager.core.screen.ScreenKey
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
@@ -42,8 +44,6 @@ import ca.gosyer.jui.ui.viewModel
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
||||||
import ca.gosyer.jui.uicore.prefs.asStateIn
|
import ca.gosyer.jui.uicore.prefs.asStateIn
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
@@ -37,8 +39,6 @@ import ca.gosyer.jui.ui.main.components.bottomNav
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import cafe.adriel.voyager.core.screen.Screen
|
import cafe.adriel.voyager.core.screen.Screen
|
||||||
import cafe.adriel.voyager.core.screen.ScreenKey
|
import cafe.adriel.voyager.core.screen.ScreenKey
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
@@ -28,8 +30,6 @@ import ca.gosyer.jui.ui.main.components.bottomNav
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import cafe.adriel.voyager.core.screen.Screen
|
import cafe.adriel.voyager.core.screen.Screen
|
||||||
import cafe.adriel.voyager.core.screen.ScreenKey
|
import cafe.adriel.voyager.core.screen.ScreenKey
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.LazyListScope
|
import androidx.compose.foundation.lazy.LazyListScope
|
||||||
@@ -40,8 +42,6 @@ import ca.gosyer.jui.ui.viewModel
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
import ca.gosyer.jui.uicore.prefs.PreferenceMutableStateFlow
|
||||||
import ca.gosyer.jui.uicore.prefs.asStateIn
|
import ca.gosyer.jui.uicore.prefs.asStateIn
|
||||||
import ca.gosyer.jui.uicore.prefs.asStringStateIn
|
import ca.gosyer.jui.uicore.prefs.asStringStateIn
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.rememberLazyListState
|
import androidx.compose.foundation.lazy.rememberLazyListState
|
||||||
@@ -28,8 +30,6 @@ import ca.gosyer.jui.ui.main.components.bottomNav
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import cafe.adriel.voyager.core.screen.Screen
|
import cafe.adriel.voyager.core.screen.Screen
|
||||||
import cafe.adriel.voyager.core.screen.ScreenKey
|
import cafe.adriel.voyager.core.screen.ScreenKey
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import androidx.compose.foundation.layout.aspectRatio
|
|||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
@@ -43,7 +44,6 @@ import ca.gosyer.jui.uicore.components.mangaAspectRatio
|
|||||||
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import androidx.compose.foundation.layout.aspectRatio
|
|||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
@@ -47,7 +48,6 @@ import ca.gosyer.jui.uicore.components.mangaAspectRatio
|
|||||||
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.requiredHeight
|
import androidx.compose.foundation.layout.requiredHeight
|
||||||
@@ -37,7 +38,6 @@ import ca.gosyer.jui.uicore.components.MangaListItemTitle
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|||||||
@@ -18,8 +18,10 @@ import androidx.compose.foundation.layout.WindowInsets
|
|||||||
import androidx.compose.foundation.layout.WindowInsetsSides
|
import androidx.compose.foundation.layout.WindowInsetsSides
|
||||||
import androidx.compose.foundation.layout.add
|
import androidx.compose.foundation.layout.add
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.material.DropdownMenu
|
import androidx.compose.material.DropdownMenu
|
||||||
@@ -60,8 +62,6 @@ import ca.gosyer.jui.ui.main.components.bottomNav
|
|||||||
import ca.gosyer.jui.ui.sources.browse.filter.SourceFiltersMenu
|
import ca.gosyer.jui.ui.sources.browse.filter.SourceFiltersMenu
|
||||||
import ca.gosyer.jui.ui.sources.browse.filter.model.SourceFiltersView
|
import ca.gosyer.jui.ui.sources.browse.filter.model.SourceFiltersView
|
||||||
import ca.gosyer.jui.uicore.components.LoadingScreen
|
import ca.gosyer.jui.uicore.components.LoadingScreen
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.requiredSize
|
import androidx.compose.foundation.layout.requiredSize
|
||||||
@@ -49,7 +50,6 @@ import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
|||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
import cafe.adriel.voyager.navigator.currentOrThrow
|
import cafe.adriel.voyager.navigator.currentOrThrow
|
||||||
|
|||||||
@@ -20,8 +20,10 @@ import androidx.compose.foundation.layout.fillMaxHeight
|
|||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.LazyRow
|
import androidx.compose.foundation.lazy.LazyRow
|
||||||
@@ -55,8 +57,6 @@ import ca.gosyer.jui.uicore.components.HorizontalScrollbar
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|
||||||
|
|||||||
@@ -21,9 +21,11 @@ import androidx.compose.foundation.layout.fillMaxHeight
|
|||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
@@ -65,8 +67,6 @@ import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
|||||||
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberVerticalScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
import ca.gosyer.jui.uicore.image.ImageLoaderImage
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import com.vanpra.composematerialdialogs.rememberMaterialDialogState
|
import com.vanpra.composematerialdialogs.rememberMaterialDialogState
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
@@ -47,8 +49,6 @@ import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
|||||||
import ca.gosyer.jui.uicore.components.keyboardHandler
|
import ca.gosyer.jui.uicore.components.keyboardHandler
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import com.vanpra.composematerialdialogs.MaterialDialog
|
import com.vanpra.composematerialdialogs.MaterialDialog
|
||||||
import com.vanpra.composematerialdialogs.TextFieldStyle
|
import com.vanpra.composematerialdialogs.TextFieldStyle
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ import androidx.compose.foundation.layout.add
|
|||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
import androidx.compose.foundation.layout.fillMaxHeight
|
import androidx.compose.foundation.layout.fillMaxHeight
|
||||||
import androidx.compose.foundation.layout.fillMaxSize
|
import androidx.compose.foundation.layout.fillMaxSize
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.statusBars
|
||||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.itemsIndexed
|
import androidx.compose.foundation.lazy.itemsIndexed
|
||||||
@@ -63,8 +65,6 @@ import ca.gosyer.jui.uicore.components.LoadingScreen
|
|||||||
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
import ca.gosyer.jui.uicore.components.VerticalScrollbar
|
||||||
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
import ca.gosyer.jui.uicore.components.rememberScrollbarAdapter
|
||||||
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
import ca.gosyer.jui.uicore.components.scrollbarPadding
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import ca.gosyer.jui.uicore.insets.statusBars
|
|
||||||
import ca.gosyer.jui.uicore.resources.stringResource
|
import ca.gosyer.jui.uicore.resources.stringResource
|
||||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
|
|||||||
@@ -1,295 +0,0 @@
|
|||||||
/*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@file:Suppress("unused")
|
|
||||||
|
|
||||||
package ca.gosyer.jui.uicore.insets
|
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
|
||||||
import androidx.compose.foundation.layout.WindowInsets
|
|
||||||
import androidx.compose.foundation.layout.areNavigationBarsVisible
|
|
||||||
import androidx.compose.foundation.layout.areStatusBarsVisible
|
|
||||||
import androidx.compose.foundation.layout.areSystemBarsVisible
|
|
||||||
import androidx.compose.foundation.layout.captionBar
|
|
||||||
import androidx.compose.foundation.layout.captionBarIgnoringVisibility
|
|
||||||
import androidx.compose.foundation.layout.displayCutout
|
|
||||||
import androidx.compose.foundation.layout.ime
|
|
||||||
import androidx.compose.foundation.layout.isCaptionBarVisible
|
|
||||||
import androidx.compose.foundation.layout.isImeVisible
|
|
||||||
import androidx.compose.foundation.layout.isTappableElementVisible
|
|
||||||
import androidx.compose.foundation.layout.mandatorySystemGestures
|
|
||||||
import androidx.compose.foundation.layout.navigationBars
|
|
||||||
import androidx.compose.foundation.layout.navigationBarsIgnoringVisibility
|
|
||||||
import androidx.compose.foundation.layout.safeContent
|
|
||||||
import androidx.compose.foundation.layout.safeDrawing
|
|
||||||
import androidx.compose.foundation.layout.safeGestures
|
|
||||||
import androidx.compose.foundation.layout.statusBars
|
|
||||||
import androidx.compose.foundation.layout.statusBarsIgnoringVisibility
|
|
||||||
import androidx.compose.foundation.layout.systemBars
|
|
||||||
import androidx.compose.foundation.layout.systemBarsIgnoringVisibility
|
|
||||||
import androidx.compose.foundation.layout.systemGestures
|
|
||||||
import androidx.compose.foundation.layout.tappableElement
|
|
||||||
import androidx.compose.foundation.layout.tappableElementIgnoringVisibility
|
|
||||||
import androidx.compose.foundation.layout.waterfall
|
|
||||||
import androidx.compose.runtime.Composable
|
|
||||||
import androidx.compose.runtime.NonRestartableComposable
|
|
||||||
import androidx.core.view.WindowInsetsCompat
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.captionBar].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.captionBar: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = captionBar
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.displayCutout]. This insets represents the area that the
|
|
||||||
* display cutout (e.g. for camera) is and important content should be excluded from.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.displayCutout: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = displayCutout
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.ime]. On API level 23 (M) and above, the soft keyboard can be
|
|
||||||
* detected and [ime] will update when it shows. On API 30 (R) and above, the [ime] insets will
|
|
||||||
* animate synchronously with the actual IME animation.
|
|
||||||
*
|
|
||||||
* Developers should set `android:windowSoftInputMode="adjustResize"` in their
|
|
||||||
* `AndroidManifest.xml` file and call `WindowCompat.setDecorFitsSystemWindows(window, false)`
|
|
||||||
* in their [android.app.Activity.onCreate].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.ime: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = ime
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.mandatorySystemGestures]. These insets represents the
|
|
||||||
* space where system gestures have priority over application gestures.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.mandatorySystemGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = mandatorySystemGestures
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.navigationBars]. These insets represent where
|
|
||||||
* system UI places navigation bars. Interactive UI should avoid the navigation bars
|
|
||||||
* area.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.navigationBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = navigationBars
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.statusBars].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.statusBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = statusBars
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.systemBars].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.systemBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = systemBars
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.systemGestures].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.systemGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = systemGestures
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.tappableElement].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.tappableElement: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = tappableElement
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets for the curved areas in a waterfall display.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.waterfall: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = waterfall
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include areas where content may be covered by other drawn content.
|
|
||||||
* This includes all [system bars][systemBars], [display cutout][displayCutout], and
|
|
||||||
* [soft keyboard][ime].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.safeDrawing: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = safeDrawing
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include areas where gestures may be confused with other input,
|
|
||||||
* including [system gestures][systemGestures],
|
|
||||||
* [mandatory system gestures][mandatorySystemGestures],
|
|
||||||
* [rounded display areas][waterfall], and [tappable areas][tappableElement].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.safeGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = safeGestures
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include all areas that may be drawn over or have gesture confusion,
|
|
||||||
* including everything in [safeDrawing] and [safeGestures].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.safeContent: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = safeContent
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that the [WindowInsetsCompat.Type.captionBar] will consume if shown.
|
|
||||||
* If it cannot be shown then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.captionBarIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = captionBarIgnoringVisibility
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.navigationBars] will consume if shown.
|
|
||||||
* These insets represent where system UI places navigation bars. Interactive UI should
|
|
||||||
* avoid the navigation bars area. If navigation bars cannot be shown, then this will be
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.navigationBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = navigationBarsIgnoringVisibility
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.statusBars] will consume if shown.
|
|
||||||
* If the status bar can never be shown, then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.statusBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = statusBarsIgnoringVisibility
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.systemBars] will consume if shown.
|
|
||||||
*
|
|
||||||
* If system bars can never be shown, then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.systemBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = systemBarsIgnoringVisibility
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.tappableElement] will consume if active.
|
|
||||||
*
|
|
||||||
* If there are never tappable elements then this is empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.tappableElementIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = tappableElementIgnoringVisibility
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [caption bar][captionBar] is being displayed, irrespective of
|
|
||||||
* whether it intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.isCaptionBarVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = isCaptionBarVisible
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [soft keyboard][ime] is being displayed, irrespective of
|
|
||||||
* whether it intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.isImeVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = isImeVisible
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [statusBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.areStatusBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = areStatusBarsVisible
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [navigationBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.areNavigationBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = areNavigationBarsVisible
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [systemBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.areSystemBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = areSystemBarsVisible
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [tappableElement] is being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.isTappableElementVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = isTappableElementVisible
|
|
||||||
@@ -19,6 +19,7 @@ import androidx.compose.foundation.layout.RowScope
|
|||||||
import androidx.compose.foundation.layout.WindowInsets
|
import androidx.compose.foundation.layout.WindowInsets
|
||||||
import androidx.compose.foundation.layout.WindowInsetsSides
|
import androidx.compose.foundation.layout.WindowInsetsSides
|
||||||
import androidx.compose.foundation.layout.asPaddingValues
|
import androidx.compose.foundation.layout.asPaddingValues
|
||||||
|
import androidx.compose.foundation.layout.navigationBars
|
||||||
import androidx.compose.foundation.layout.only
|
import androidx.compose.foundation.layout.only
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
import androidx.compose.foundation.layout.size
|
import androidx.compose.foundation.layout.size
|
||||||
@@ -41,7 +42,6 @@ import androidx.compose.ui.hapticfeedback.HapticFeedbackType
|
|||||||
import androidx.compose.ui.platform.LocalHapticFeedback
|
import androidx.compose.ui.platform.LocalHapticFeedback
|
||||||
import androidx.compose.ui.text.style.TextOverflow
|
import androidx.compose.ui.text.style.TextOverflow
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import ca.gosyer.jui.uicore.insets.navigationBars
|
|
||||||
import kotlinx.collections.immutable.ImmutableList
|
import kotlinx.collections.immutable.ImmutableList
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
|
|||||||
@@ -1,270 +0,0 @@
|
|||||||
/*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@file:Suppress("KDocUnresolvedReference")
|
|
||||||
|
|
||||||
package ca.gosyer.jui.uicore.insets
|
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
|
||||||
import androidx.compose.foundation.layout.WindowInsets
|
|
||||||
import androidx.compose.runtime.Composable
|
|
||||||
import androidx.compose.runtime.NonRestartableComposable
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.captionBar].
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.captionBar: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.displayCutout]. This insets represents the area that the
|
|
||||||
* display cutout (e.g. for camera) is and important content should be excluded from.
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.displayCutout: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.ime]. On API level 23 (M) and above, the soft keyboard can be
|
|
||||||
* detected and [ime] will update when it shows. On API 30 (R) and above, the [ime] insets will
|
|
||||||
* animate synchronously with the actual IME animation.
|
|
||||||
*
|
|
||||||
* Developers should set `android:windowSoftInputMode="adjustResize"` in their
|
|
||||||
* `AndroidManifest.xml` file and call `WindowCompat.setDecorFitsSystemWindows(window, false)`
|
|
||||||
* in their [android.app.Activity.onCreate].
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.ime: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.mandatorySystemGestures]. These insets represents the
|
|
||||||
* space where system gestures have priority over application gestures.
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.mandatorySystemGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.navigationBars]. These insets represent where
|
|
||||||
* system UI places navigation bars. Interactive UI should avoid the navigation bars
|
|
||||||
* area.
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.navigationBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.statusBars].
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.statusBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.systemBars].
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.systemBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.systemGestures].
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.systemGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.tappableElement].
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.tappableElement: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets for the curved areas in a waterfall display.
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.waterfall: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include areas where content may be covered by other drawn content.
|
|
||||||
* This includes all [system bars][systemBars], [display cutout][displayCutout], and
|
|
||||||
* [soft keyboard][ime].
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.safeDrawing: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include areas where gestures may be confused with other input,
|
|
||||||
* including [system gestures][systemGestures],
|
|
||||||
* [mandatory system gestures][mandatorySystemGestures],
|
|
||||||
* [rounded display areas][waterfall], and [tappable areas][tappableElement].
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.safeGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include all areas that may be drawn over or have gesture confusion,
|
|
||||||
* including everything in [safeDrawing] and [safeGestures].
|
|
||||||
*/
|
|
||||||
expect val WindowInsets.Companion.safeContent: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that the [WindowInsetsCompat.Type.captionBar] will consume if shown.
|
|
||||||
* If it cannot be shown then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
expect val WindowInsets.Companion.captionBarIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.navigationBars] will consume if shown.
|
|
||||||
* These insets represent where system UI places navigation bars. Interactive UI should
|
|
||||||
* avoid the navigation bars area. If navigation bars cannot be shown, then this will be
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
expect val WindowInsets.Companion.navigationBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.statusBars] will consume if shown.
|
|
||||||
* If the status bar can never be shown, then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
expect val WindowInsets.Companion.statusBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.systemBars] will consume if shown.
|
|
||||||
*
|
|
||||||
* If system bars can never be shown, then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
expect val WindowInsets.Companion.systemBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.tappableElement] will consume if active.
|
|
||||||
*
|
|
||||||
* If there are never tappable elements then this is empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
expect val WindowInsets.Companion.tappableElementIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [caption bar][captionBar] is being displayed, irrespective of
|
|
||||||
* whether it intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
expect val WindowInsets.Companion.isCaptionBarVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [soft keyboard][ime] is being displayed, irrespective of
|
|
||||||
* whether it intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
expect val WindowInsets.Companion.isImeVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [statusBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
expect val WindowInsets.Companion.areStatusBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [navigationBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
expect val WindowInsets.Companion.areNavigationBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [systemBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
expect val WindowInsets.Companion.areSystemBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [tappableElement] is being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
expect val WindowInsets.Companion.isTappableElementVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get
|
|
||||||
@@ -1,287 +0,0 @@
|
|||||||
/*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@file:Suppress("KDocUnresolvedReference", "unused")
|
|
||||||
|
|
||||||
package ca.gosyer.jui.uicore.insets
|
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
|
||||||
import androidx.compose.foundation.layout.WindowInsets
|
|
||||||
import androidx.compose.runtime.Composable
|
|
||||||
import androidx.compose.runtime.Immutable
|
|
||||||
import androidx.compose.runtime.NonRestartableComposable
|
|
||||||
import androidx.compose.ui.unit.Density
|
|
||||||
import androidx.compose.ui.unit.LayoutDirection
|
|
||||||
|
|
||||||
@Immutable
|
|
||||||
object EmptyWindowInsets : WindowInsets {
|
|
||||||
override fun getBottom(density: Density): Int = 0
|
|
||||||
override fun getLeft(
|
|
||||||
density: Density,
|
|
||||||
layoutDirection: LayoutDirection,
|
|
||||||
): Int = 0
|
|
||||||
override fun getRight(
|
|
||||||
density: Density,
|
|
||||||
layoutDirection: LayoutDirection,
|
|
||||||
): Int = 0
|
|
||||||
override fun getTop(density: Density): Int = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.captionBar].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.captionBar: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.displayCutout]. This insets represents the area that the
|
|
||||||
* display cutout (e.g. for camera) is and important content should be excluded from.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.displayCutout: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.ime]. On API level 23 (M) and above, the soft keyboard can be
|
|
||||||
* detected and [ime] will update when it shows. On API 30 (R) and above, the [ime] insets will
|
|
||||||
* animate synchronously with the actual IME animation.
|
|
||||||
*
|
|
||||||
* Developers should set `android:windowSoftInputMode="adjustResize"` in their
|
|
||||||
* `AndroidManifest.xml` file and call `WindowCompat.setDecorFitsSystemWindows(window, false)`
|
|
||||||
* in their [android.app.Activity.onCreate].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.ime: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.mandatorySystemGestures]. These insets represents the
|
|
||||||
* space where system gestures have priority over application gestures.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.mandatorySystemGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.navigationBars]. These insets represent where
|
|
||||||
* system UI places navigation bars. Interactive UI should avoid the navigation bars
|
|
||||||
* area.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.navigationBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.statusBars].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.statusBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.systemBars].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.systemBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.systemGestures].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.systemGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.tappableElement].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.tappableElement: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets for the curved areas in a waterfall display.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.waterfall: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include areas where content may be covered by other drawn content.
|
|
||||||
* This includes all [system bars][systemBars], [display cutout][displayCutout], and
|
|
||||||
* [soft keyboard][ime].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.safeDrawing: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include areas where gestures may be confused with other input,
|
|
||||||
* including [system gestures][systemGestures],
|
|
||||||
* [mandatory system gestures][mandatorySystemGestures],
|
|
||||||
* [rounded display areas][waterfall], and [tappable areas][tappableElement].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.safeGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include all areas that may be drawn over or have gesture confusion,
|
|
||||||
* including everything in [safeDrawing] and [safeGestures].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.safeContent: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that the [WindowInsetsCompat.Type.captionBar] will consume if shown.
|
|
||||||
* If it cannot be shown then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.captionBarIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.navigationBars] will consume if shown.
|
|
||||||
* These insets represent where system UI places navigation bars. Interactive UI should
|
|
||||||
* avoid the navigation bars area. If navigation bars cannot be shown, then this will be
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.navigationBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.statusBars] will consume if shown.
|
|
||||||
* If the status bar can never be shown, then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.statusBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.systemBars] will consume if shown.
|
|
||||||
*
|
|
||||||
* If system bars can never be shown, then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.systemBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.tappableElement] will consume if active.
|
|
||||||
*
|
|
||||||
* If there are never tappable elements then this is empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.tappableElementIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [caption bar][captionBar] is being displayed, irrespective of
|
|
||||||
* whether it intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.isCaptionBarVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [soft keyboard][ime] is being displayed, irrespective of
|
|
||||||
* whether it intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.isImeVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [statusBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.areStatusBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [navigationBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.areNavigationBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [systemBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.areSystemBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [tappableElement] is being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.isTappableElementVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
@@ -1,287 +0,0 @@
|
|||||||
/*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
@file:Suppress("KDocUnresolvedReference", "unused")
|
|
||||||
|
|
||||||
package ca.gosyer.jui.uicore.insets
|
|
||||||
|
|
||||||
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
|
||||||
import androidx.compose.foundation.layout.WindowInsets
|
|
||||||
import androidx.compose.runtime.Composable
|
|
||||||
import androidx.compose.runtime.Immutable
|
|
||||||
import androidx.compose.runtime.NonRestartableComposable
|
|
||||||
import androidx.compose.ui.unit.Density
|
|
||||||
import androidx.compose.ui.unit.LayoutDirection
|
|
||||||
|
|
||||||
@Immutable
|
|
||||||
object EmptyWindowInsets : WindowInsets {
|
|
||||||
override fun getBottom(density: Density): Int = 0
|
|
||||||
override fun getLeft(
|
|
||||||
density: Density,
|
|
||||||
layoutDirection: LayoutDirection,
|
|
||||||
): Int = 0
|
|
||||||
override fun getRight(
|
|
||||||
density: Density,
|
|
||||||
layoutDirection: LayoutDirection,
|
|
||||||
): Int = 0
|
|
||||||
override fun getTop(density: Density): Int = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.captionBar].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.captionBar: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.displayCutout]. This insets represents the area that the
|
|
||||||
* display cutout (e.g. for camera) is and important content should be excluded from.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.displayCutout: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.ime]. On API level 23 (M) and above, the soft keyboard can be
|
|
||||||
* detected and [ime] will update when it shows. On API 30 (R) and above, the [ime] insets will
|
|
||||||
* animate synchronously with the actual IME animation.
|
|
||||||
*
|
|
||||||
* Developers should set `android:windowSoftInputMode="adjustResize"` in their
|
|
||||||
* `AndroidManifest.xml` file and call `WindowCompat.setDecorFitsSystemWindows(window, false)`
|
|
||||||
* in their [android.app.Activity.onCreate].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.ime: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.mandatorySystemGestures]. These insets represents the
|
|
||||||
* space where system gestures have priority over application gestures.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.mandatorySystemGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.navigationBars]. These insets represent where
|
|
||||||
* system UI places navigation bars. Interactive UI should avoid the navigation bars
|
|
||||||
* area.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.navigationBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.statusBars].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.statusBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.systemBars].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.systemBars: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.systemGestures].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.systemGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* For the [WindowInsetsCompat.Type.tappableElement].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.tappableElement: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets for the curved areas in a waterfall display.
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.waterfall: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include areas where content may be covered by other drawn content.
|
|
||||||
* This includes all [system bars][systemBars], [display cutout][displayCutout], and
|
|
||||||
* [soft keyboard][ime].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.safeDrawing: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include areas where gestures may be confused with other input,
|
|
||||||
* including [system gestures][systemGestures],
|
|
||||||
* [mandatory system gestures][mandatorySystemGestures],
|
|
||||||
* [rounded display areas][waterfall], and [tappable areas][tappableElement].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.safeGestures: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that include all areas that may be drawn over or have gesture confusion,
|
|
||||||
* including everything in [safeDrawing] and [safeGestures].
|
|
||||||
*/
|
|
||||||
actual val WindowInsets.Companion.safeContent: WindowInsets
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that the [WindowInsetsCompat.Type.captionBar] will consume if shown.
|
|
||||||
* If it cannot be shown then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.captionBarIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.navigationBars] will consume if shown.
|
|
||||||
* These insets represent where system UI places navigation bars. Interactive UI should
|
|
||||||
* avoid the navigation bars area. If navigation bars cannot be shown, then this will be
|
|
||||||
* empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.navigationBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.statusBars] will consume if shown.
|
|
||||||
* If the status bar can never be shown, then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.statusBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.systemBars] will consume if shown.
|
|
||||||
*
|
|
||||||
* If system bars can never be shown, then this will be empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.systemBarsIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The insets that [WindowInsetsCompat.Type.tappableElement] will consume if active.
|
|
||||||
*
|
|
||||||
* If there are never tappable elements then this is empty.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.tappableElementIgnoringVisibility: WindowInsets
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = EmptyWindowInsets
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [caption bar][captionBar] is being displayed, irrespective of
|
|
||||||
* whether it intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.isCaptionBarVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [soft keyboard][ime] is being displayed, irrespective of
|
|
||||||
* whether it intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.isImeVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [statusBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.areStatusBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [navigationBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.areNavigationBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [systemBars] are being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.areSystemBarsVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
|
|
||||||
/**
|
|
||||||
* `true` when the [tappableElement] is being displayed, irrespective of
|
|
||||||
* whether they intersects with the Window.
|
|
||||||
*/
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
actual val WindowInsets.Companion.isTappableElementVisible: Boolean
|
|
||||||
@Suppress("OPT_IN_MARKER_ON_WRONG_TARGET")
|
|
||||||
@ExperimentalLayoutApi
|
|
||||||
@Composable
|
|
||||||
@NonRestartableComposable
|
|
||||||
get() = false
|
|
||||||
Reference in New Issue
Block a user