diff --git a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/analytics/ui/view/AnalyticsScreen.kt b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/analytics/ui/view/AnalyticsScreen.kt index f1a95c7b..da75546b 100644 --- a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/analytics/ui/view/AnalyticsScreen.kt +++ b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/analytics/ui/view/AnalyticsScreen.kt @@ -13,7 +13,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.itemsIndexed -import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect @@ -34,6 +33,7 @@ import io.github.openflocon.flocondesktop.features.analytics.ui.model.items import io.github.openflocon.flocondesktop.features.analytics.ui.model.previewAnalyticsContentStateUiModel import io.github.openflocon.flocondesktop.features.analytics.ui.model.previewAnalyticsStateUiModel import io.github.openflocon.library.designsystem.FloconTheme +import io.github.openflocon.library.designsystem.components.FloconSurface import org.jetbrains.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @@ -73,7 +73,7 @@ fun AnalyticsScreen( ) { var analyticsItems by remember { mutableStateOf>(emptyList()) } - Surface(modifier = modifier) { + FloconSurface(modifier = modifier) { Box(modifier = Modifier.fillMaxSize()) { Column(modifier = Modifier.fillMaxSize()) { Column( @@ -103,7 +103,7 @@ fun AnalyticsScreen( ) } - Surface( + FloconSurface( modifier = Modifier.fillMaxSize() .clickable( interactionSource = null, diff --git a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/dashboard/ui/view/DashboardScreen.kt b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/dashboard/ui/view/DashboardScreen.kt index 9a16cf1b..29f40401 100644 --- a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/dashboard/ui/view/DashboardScreen.kt +++ b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/dashboard/ui/view/DashboardScreen.kt @@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect @@ -18,6 +17,7 @@ import io.github.openflocon.flocondesktop.features.dashboard.ui.model.DashboardV import io.github.openflocon.flocondesktop.features.dashboard.ui.model.DashboardsStateUiModel import io.github.openflocon.flocondesktop.features.dashboard.ui.model.DeviceDashboardUiModel import io.github.openflocon.library.designsystem.FloconTheme +import io.github.openflocon.library.designsystem.components.FloconSurface import org.koin.compose.viewmodel.koinViewModel @Composable @@ -53,7 +53,7 @@ fun DashboardScreen( onUpdateCheckBox: (checkBoxId: String, value: Boolean) -> Unit, modifier: Modifier = Modifier, ) { - Surface(modifier = modifier) { + FloconSurface(modifier = modifier) { Column( modifier = Modifier.fillMaxSize(), ) { diff --git a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/database/ui/view/DatabaseScreen.kt b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/database/ui/view/DatabaseScreen.kt index 6c4ef54b..c2f5969f 100644 --- a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/database/ui/view/DatabaseScreen.kt +++ b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/database/ui/view/DatabaseScreen.kt @@ -6,7 +6,6 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect @@ -24,6 +23,7 @@ import io.github.openflocon.flocondesktop.features.database.ui.model.DeviceDataB import io.github.openflocon.flocondesktop.features.database.ui.model.previewDatabaseScreenStateQueries import io.github.openflocon.flocondesktop.features.database.ui.model.previewDatabasesStateUiModel import io.github.openflocon.library.designsystem.FloconTheme +import io.github.openflocon.library.designsystem.components.FloconSurface import org.jetbrains.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @@ -59,7 +59,7 @@ fun DatabaseScreen( ) { var query by remember { mutableStateOf("") } - Surface(modifier = modifier) { + FloconSurface(modifier = modifier) { Column(modifier = Modifier.fillMaxSize()) { Column( modifier = Modifier.fillMaxWidth() diff --git a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/ui/view/DeeplinkScreen.kt b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/ui/view/DeeplinkScreen.kt index b74cd8cd..dc0ac3e1 100644 --- a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/ui/view/DeeplinkScreen.kt +++ b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/deeplinks/ui/view/DeeplinkScreen.kt @@ -9,8 +9,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -22,6 +20,7 @@ import io.github.openflocon.flocondesktop.features.deeplinks.ui.model.DeeplinkPa import io.github.openflocon.flocondesktop.features.deeplinks.ui.model.DeeplinkViewState import io.github.openflocon.flocondesktop.features.deeplinks.ui.model.previewDeeplinkViewState import io.github.openflocon.library.designsystem.FloconTheme +import io.github.openflocon.library.designsystem.components.FloconSurface import org.jetbrains.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @@ -43,7 +42,7 @@ private fun DeeplinkScreen( submit: (DeeplinkViewState, values: Map) -> Unit, modifier: Modifier = Modifier, ) { - Surface(modifier = modifier) { + FloconSurface(modifier = modifier) { Column(modifier = Modifier.fillMaxSize()) { Column( modifier = Modifier.fillMaxWidth() diff --git a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/files/ui/view/FilesScreen.kt b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/files/ui/view/FilesScreen.kt index 64bfd544..a9b241aa 100644 --- a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/files/ui/view/FilesScreen.kt +++ b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/files/ui/view/FilesScreen.kt @@ -7,7 +7,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.material3.HorizontalDivider -import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.getValue @@ -19,6 +18,7 @@ import io.github.openflocon.flocondesktop.features.files.ui.model.FileUiModel import io.github.openflocon.flocondesktop.features.files.ui.model.FilesStateUiModel import io.github.openflocon.flocondesktop.features.files.ui.model.previewFilesStateUiModel import io.github.openflocon.library.designsystem.FloconTheme +import io.github.openflocon.library.designsystem.components.FloconSurface import org.jetbrains.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @@ -54,7 +54,7 @@ private fun FilesScreen( onContextualAction: (FileUiModel, FileUiModel.ContextualAction.Action) -> Unit, modifier: Modifier = Modifier, ) { - Surface(modifier = modifier) { + FloconSurface(modifier = modifier) { Column(modifier = Modifier.fillMaxSize()) { FilesTopBar( modifier = Modifier.fillMaxWidth(), diff --git a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/images/ui/view/ImagesScreen.kt b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/images/ui/view/ImagesScreen.kt index 7fbb0367..feffd585 100644 --- a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/images/ui/view/ImagesScreen.kt +++ b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/images/ui/view/ImagesScreen.kt @@ -15,7 +15,6 @@ import androidx.compose.foundation.lazy.grid.items import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.material.icons.Icons import androidx.compose.material.icons.outlined.Delete -import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect @@ -37,6 +36,7 @@ import io.github.openflocon.flocondesktop.features.images.ui.model.ImagesUiModel import io.github.openflocon.flocondesktop.features.images.ui.model.previewImagesStateUiModel import io.github.openflocon.library.designsystem.FloconTheme import io.github.openflocon.library.designsystem.components.FloconIconButton +import io.github.openflocon.library.designsystem.components.FloconSurface import org.jetbrains.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @@ -77,7 +77,7 @@ private fun ImagesScreen( clickedImage: ImagesUiModel?, modifier: Modifier = Modifier, ) { - Surface(modifier = modifier) { + FloconSurface(modifier = modifier) { Column(modifier = Modifier.fillMaxSize()) { Column( modifier = Modifier diff --git a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/network/ui/view/NetworkScreen.kt b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/network/ui/view/NetworkScreen.kt index d5ff1a9a..2f0b2ccb 100644 --- a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/network/ui/view/NetworkScreen.kt +++ b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/network/ui/view/NetworkScreen.kt @@ -14,7 +14,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.requiredWidth import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items -import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue @@ -33,6 +32,7 @@ import io.github.openflocon.flocondesktop.features.network.ui.previewNetworkUiSt import io.github.openflocon.flocondesktop.features.network.ui.view.components.NetworkItemHeaderView import io.github.openflocon.flocondesktop.features.network.ui.view.header.NetworkFilter import io.github.openflocon.library.designsystem.FloconTheme +import io.github.openflocon.library.designsystem.components.FloconSurface import org.jetbrains.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @@ -57,7 +57,7 @@ fun NetworkScreen( val columnWidths: NetworkItemColumnWidths = remember { NetworkItemColumnWidths() } // Default widths provided - Surface(modifier = modifier) { + FloconSurface(modifier = modifier) { Box(modifier = Modifier.fillMaxSize()) { Column( modifier = Modifier diff --git a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/sharedpreferences/ui/view/SharedPreferencesScreen.kt b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/sharedpreferences/ui/view/SharedPreferencesScreen.kt index 6f8ded48..e20b477d 100644 --- a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/sharedpreferences/ui/view/SharedPreferencesScreen.kt +++ b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/sharedpreferences/ui/view/SharedPreferencesScreen.kt @@ -10,7 +10,6 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.foundation.text.selection.SelectionContainer -import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect @@ -26,6 +25,7 @@ import io.github.openflocon.flocondesktop.features.sharedpreferences.ui.model.Sh import io.github.openflocon.flocondesktop.features.sharedpreferences.ui.model.previewSharedPreferencesRowsStateUiModel import io.github.openflocon.flocondesktop.features.sharedpreferences.ui.model.previewSharedPrefsStateUiModel import io.github.openflocon.library.designsystem.FloconTheme +import io.github.openflocon.library.designsystem.components.FloconSurface import org.jetbrains.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @@ -57,7 +57,7 @@ fun SharedPrefScreen( rows: SharedPreferencesRowsStateUiModel, changeValue: (SharedPreferencesRowUiModel, String) -> Unit, ) { - Surface(modifier = modifier) { + FloconSurface(modifier = modifier) { Column(modifier = Modifier.fillMaxSize()) { Column( modifier = Modifier.fillMaxWidth() diff --git a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/table/ui/view/TableScreen.kt b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/table/ui/view/TableScreen.kt index 942dc442..d2eca2f9 100644 --- a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/table/ui/view/TableScreen.kt +++ b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/features/table/ui/view/TableScreen.kt @@ -19,7 +19,6 @@ import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.text.selection.SelectionContainer import androidx.compose.foundation.verticalScroll import androidx.compose.material3.HorizontalDivider -import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.DisposableEffect @@ -41,6 +40,7 @@ import io.github.openflocon.flocondesktop.features.table.ui.model.items import io.github.openflocon.flocondesktop.features.table.ui.model.previewTableContentStateUiModel import io.github.openflocon.flocondesktop.features.table.ui.model.previewTablesStateUiModel import io.github.openflocon.library.designsystem.FloconTheme +import io.github.openflocon.library.designsystem.components.FloconSurface import org.jetbrains.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @@ -81,7 +81,7 @@ fun TableScreen( val columnsWidth = 150.dp var tableItems by remember { mutableStateOf>(emptyList()) } - Surface(modifier = modifier) { + FloconSurface(modifier = modifier) { Box(modifier = Modifier.fillMaxSize()) { Column(modifier = Modifier.fillMaxSize()) { Column( @@ -111,7 +111,7 @@ fun TableScreen( ) } - Surface( + FloconSurface( modifier = Modifier.fillMaxSize() .clickable( interactionSource = null, diff --git a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/main/ui/settings/SettingsScreen.kt b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/main/ui/settings/SettingsScreen.kt index 988e5525..90363203 100644 --- a/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/main/ui/settings/SettingsScreen.kt +++ b/FloconDesktop/composeApp/src/commonMain/kotlin/io/github/openflocon/flocondesktop/main/ui/settings/SettingsScreen.kt @@ -11,7 +11,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.BasicTextField -import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState @@ -28,6 +27,7 @@ import androidx.compose.ui.graphics.SolidColor import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Dialog import io.github.openflocon.library.designsystem.FloconTheme +import io.github.openflocon.library.designsystem.components.FloconSurface import org.jetbrains.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @@ -78,7 +78,7 @@ private fun SettingsScreen( needsAdbSetup: Boolean, modifier: Modifier = Modifier, ) { - Surface(modifier = modifier) { + FloconSurface(modifier = modifier) { Column(modifier = Modifier.fillMaxSize()) { Box( modifier = Modifier.fillMaxWidth() diff --git a/FloconDesktop/library/designsystem/src/commonMain/kotlin/io/github/openflocon/library/designsystem/components/FloconSurface.kt b/FloconDesktop/library/designsystem/src/commonMain/kotlin/io/github/openflocon/library/designsystem/components/FloconSurface.kt index 9695d6cc..dbeb02e6 100644 --- a/FloconDesktop/library/designsystem/src/commonMain/kotlin/io/github/openflocon/library/designsystem/components/FloconSurface.kt +++ b/FloconDesktop/library/designsystem/src/commonMain/kotlin/io/github/openflocon/library/designsystem/components/FloconSurface.kt @@ -3,16 +3,16 @@ package io.github.openflocon.library.designsystem.components import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import io.github.openflocon.library.designsystem.FloconTheme import io.github.openflocon.library.designsystem.theme.contentColorFor @Composable fun FloconSurface( modifier: Modifier = Modifier, + color: Color = FloconTheme.colorPalette.surface, content: @Composable () -> Unit ) { - val color = FloconTheme.colorPalette.surface - Surface( color = color, contentColor = FloconTheme.colorPalette.contentColorFor(color),