mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-08 11:34:18 +08:00
refactor: make Sizes experimental
This commit is contained in:
@@ -25,6 +25,7 @@ kotlin {
|
|||||||
sourceSets {
|
sourceSets {
|
||||||
all {
|
all {
|
||||||
languageSettings {
|
languageSettings {
|
||||||
|
optIn("com.highcapable.flexiui.ExperimentalFlexiUISizesApi")
|
||||||
optIn("androidx.compose.ui.ExperimentalComposeUiApi")
|
optIn("androidx.compose.ui.ExperimentalComposeUiApi")
|
||||||
optIn("androidx.compose.foundation.ExperimentalFoundationApi")
|
optIn("androidx.compose.foundation.ExperimentalFoundationApi")
|
||||||
}
|
}
|
||||||
|
@@ -28,8 +28,7 @@ import androidx.compose.runtime.staticCompositionLocalOf
|
|||||||
import androidx.compose.ui.unit.Dp
|
import androidx.compose.ui.unit.Dp
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
|
||||||
// TODO: Some sizes will modify in the future
|
@ExperimentalFlexiUISizesApi
|
||||||
|
|
||||||
@Immutable
|
@Immutable
|
||||||
data class Sizes(
|
data class Sizes(
|
||||||
val spacingPrimary: Dp,
|
val spacingPrimary: Dp,
|
||||||
@@ -61,4 +60,18 @@ internal val DefaultSizes = Sizes(
|
|||||||
borderSizePrimary = 2.dp,
|
borderSizePrimary = 2.dp,
|
||||||
borderSizeSecondary = 1.dp,
|
borderSizeSecondary = 1.dp,
|
||||||
borderSizeTertiary = 0.dp
|
borderSizeTertiary = 0.dp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The [Sizes] is experimental, the relevant design specifications for size are still being improved,
|
||||||
|
* this is the old design plan.
|
||||||
|
*
|
||||||
|
* Some sizes will modify in the future.
|
||||||
|
*/
|
||||||
|
@RequiresOptIn(
|
||||||
|
message = "The Sizes is experimental, the relevant design specifications for size are still being improved, this is the old design plan.\n" +
|
||||||
|
"Some sizes will modify in the future.",
|
||||||
|
level = RequiresOptIn.Level.WARNING
|
||||||
|
)
|
||||||
|
@MustBeDocumented
|
||||||
|
annotation class ExperimentalFlexiUISizesApi
|
Reference in New Issue
Block a user