style: change annotation order

This commit is contained in:
2024-01-16 23:20:22 +08:00
parent 57a111f7a3
commit 6b32a31f8c
7 changed files with 12 additions and 12 deletions

View File

@@ -462,6 +462,6 @@ internal fun Colors.fromDescriptor(value: ColorsDescriptor) = when (value) {
* @see Colors.fromDescriptor * @see Colors.fromDescriptor
* @return [Color] * @return [Color]
*/ */
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
internal fun ColorsDescriptor.toColor() = LocalColors.current.fromDescriptor(this) internal fun ColorsDescriptor.toColor() = LocalColors.current.fromDescriptor(this)

View File

@@ -84,8 +84,8 @@ object FlexiTheme {
* @return [Colors] * @return [Colors]
*/ */
val colors: Colors val colors: Colors
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
get() = LocalColors.current get() = LocalColors.current
/** /**
@@ -93,8 +93,8 @@ object FlexiTheme {
* @return [Shapes] * @return [Shapes]
*/ */
val shapes: Shapes val shapes: Shapes
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
get() = LocalShapes.current get() = LocalShapes.current
/** /**
@@ -102,8 +102,8 @@ object FlexiTheme {
* @return [Typography] * @return [Typography]
*/ */
val typography: Typography val typography: Typography
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
get() = LocalTypography.current get() = LocalTypography.current
/** /**
@@ -111,8 +111,8 @@ object FlexiTheme {
* @return [Sizes] * @return [Sizes]
*/ */
val sizes: Sizes val sizes: Sizes
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
get() = LocalSizes.current get() = LocalSizes.current
} }

View File

@@ -79,6 +79,6 @@ internal fun Shapes.fromDescriptor(value: ShapesDescriptor): Shape = when (value
* @see Shapes.fromDescriptor * @see Shapes.fromDescriptor
* @return [Shape] * @return [Shape]
*/ */
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
internal fun ShapesDescriptor.toShape(): Shape = LocalShapes.current.fromDescriptor(this) internal fun ShapesDescriptor.toShape(): Shape = LocalShapes.current.fromDescriptor(this)

View File

@@ -108,8 +108,8 @@ internal interface PaddingDescriptor {
val bottom: SizesDescriptor? val bottom: SizesDescriptor?
val end: SizesDescriptor? val end: SizesDescriptor?
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
fun toPadding(): ComponentPadding fun toPadding(): ComponentPadding
} }
@@ -121,8 +121,8 @@ private class PaddingDescriptorImpl(
override val end: SizesDescriptor? override val end: SizesDescriptor?
) : PaddingDescriptor { ) : PaddingDescriptor {
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
override fun toPadding() = ComponentPadding( override fun toPadding() = ComponentPadding(
start = start?.toDp() ?: 0.dp, start = start?.toDp() ?: 0.dp,
top = top?.toDp() ?: 0.dp, top = top?.toDp() ?: 0.dp,
@@ -174,8 +174,8 @@ internal fun Sizes.fromDescriptor(value: SizesDescriptor) = when (value) {
* @see Sizes.fromDescriptor * @see Sizes.fromDescriptor
* @return [Dp] * @return [Dp]
*/ */
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
internal fun SizesDescriptor.toDp() = LocalSizes.current.fromDescriptor(this) internal fun SizesDescriptor.toDp() = LocalSizes.current.fromDescriptor(this)
/** /**

View File

@@ -105,6 +105,6 @@ internal fun Typography.fromDescriptor(value: TypographyDescriptor) = when (valu
* @see Typography.fromDescriptor * @see Typography.fromDescriptor
* @return [TextStyle] * @return [TextStyle]
*/ */
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
internal fun TypographyDescriptor.toTextStyle() = LocalTypography.current.fromDescriptor(this) internal fun TypographyDescriptor.toTextStyle() = LocalTypography.current.fromDescriptor(this)

View File

@@ -168,8 +168,8 @@ object ScaffoldDefaults {
* @return [ComponentPadding] * @return [ComponentPadding]
*/ */
val padding: ComponentPadding val padding: ComponentPadding
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
get() = SurfaceDefaults.padding get() = SurfaceDefaults.padding
/** /**

View File

@@ -121,8 +121,8 @@ object SurfaceDefaults {
* @return [ComponentPadding] * @return [ComponentPadding]
*/ */
val padding: ComponentPadding val padding: ComponentPadding
@Composable
@ReadOnlyComposable @ReadOnlyComposable
@Composable
get() = SurfaceProperties.Padding.toPadding() get() = SurfaceProperties.Padding.toPadding()
} }