Skip to content

Commit 997ccbf

Browse files
committed
library: Optimize some comments
1 parent 313b6eb commit 997ccbf

File tree

8 files changed

+25
-9
lines changed

8 files changed

+25
-9
lines changed

composeApp/src/commonMain/kotlin/utils/FPSMonitor.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ import kotlinx.coroutines.Dispatchers
1313
import kotlinx.coroutines.withContext
1414
import top.yukonga.miuix.kmp.basic.Text
1515

16-
// This is a simple FPS monitor that displays the current frames per second.
16+
/**
17+
* A simple FPS monitor that displays the current frames per second.
18+
*/
1719
@Composable
1820
fun FPSMonitor(modifier: Modifier = Modifier) {
1921
var fps by remember { mutableStateOf(0) }

miuix/src/androidMain/kotlin/top/yukonga/miuix/kmp/extra/SuperDropdown.android.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import android.annotation.SuppressLint
44
import androidx.compose.runtime.MutableState
55
import androidx.compose.ui.Modifier
66

7-
/**Returns modifier to be used for the current platform */
7+
/**
8+
* Returns modifier to be used for the current platform.
9+
*/
810
@SuppressLint("ModifierFactoryExtensionFunction")
911
actual fun modifierPlatform(modifier: Modifier, isHovered: MutableState<Boolean>): Modifier = modifier

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/basic/TextField.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import top.yukonga.miuix.kmp.utils.squircleshape.SquircleShape
3838
*
3939
* @param value The input [TextFieldValue] to be shown in the text field.
4040
* @param onValueChange The callback that is triggered when the input service updates values in
41-
* * [TextFieldValue]. An updated [TextFieldValue] comes as a parameter of the callback.
41+
* [TextFieldValue]. An updated [TextFieldValue] comes as a parameter of the callback.
4242
* @param modifier The modifier to be applied to the [TextField].
4343
* @param insideMargin The margin inside the [TextField].
4444
* @param backgroundColor The background color of the [TextField].

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/extra/SuperDropdown.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ import top.yukonga.miuix.kmp.utils.getWindowSize
6767
import top.yukonga.miuix.kmp.utils.squircleshape.SquircleShape
6868
import kotlin.math.roundToInt
6969

70-
/**Returns modifier to be used for the current platform */
70+
/**
71+
* Returns modifier to be used for the current platform.
72+
*/
7173
expect fun modifierPlatform(modifier: Modifier, isHovered: MutableState<Boolean>): Modifier
7274

7375
/**

miuix/src/commonMain/kotlin/top/yukonga/miuix/kmp/utils/Utils.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@ enum class Platform {
1313
WasmJs
1414
}
1515

16-
/** Returns the current platform name */
16+
/**
17+
* Returns the current platform name.
18+
*/
1719
expect fun platform(): Platform
1820

1921
/**
2022
* Window size data class.
2123
*/
2224
data class WindowSize(val width: Int, val height: Int)
2325

24-
/** Returns the current window size */
26+
/**
27+
* Returns the current window size.
28+
*/
2529
@Composable
2630
expect fun getWindowSize(): WindowSize
2731

miuix/src/desktopMain/kotlin/top/yukonga/miuix/kmp/extra/SuperDropdown.desktop.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import androidx.compose.ui.Modifier
66
import androidx.compose.ui.input.pointer.PointerEventType
77
import androidx.compose.ui.input.pointer.onPointerEvent
88

9-
/**Returns modifier to be used for the current platform */
9+
/**
10+
* Returns modifier to be used for the current platform.
11+
*/
1012
@OptIn(ExperimentalComposeUiApi::class)
1113
actual fun modifierPlatform(modifier: Modifier, isHovered: MutableState<Boolean>): Modifier = modifier
1214
.onPointerEvent(PointerEventType.Move) {

miuix/src/iosMain/kotlin/top/yukonga/miuix/kmp/extra/SuperDropdown.ios.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ package top.yukonga.miuix.kmp.extra
33
import androidx.compose.runtime.MutableState
44
import androidx.compose.ui.Modifier
55

6-
/**Returns modifier to be used for the current platform */
6+
/**
7+
* Returns modifier to be used for the current platform.
8+
*/
79
actual fun modifierPlatform(modifier: Modifier, isHovered: MutableState<Boolean>): Modifier = modifier

miuix/src/wasmJsMain/kotlin/top/yukonga/miuix/kmp/extra/SuperDropdown.wasmJs.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import androidx.compose.ui.Modifier
66
import androidx.compose.ui.input.pointer.PointerEventType
77
import androidx.compose.ui.input.pointer.onPointerEvent
88

9-
/**Returns modifier to be used for the current platform */
9+
/**
10+
* Returns modifier to be used for the current platform.
11+
*/
1012
@OptIn(ExperimentalComposeUiApi::class)
1113
actual fun modifierPlatform(modifier: Modifier, isHovered: MutableState<Boolean>): Modifier = modifier
1214
.onPointerEvent(PointerEventType.Move) {

0 commit comments

Comments
 (0)