Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.widthIn
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.Stable
Expand All @@ -13,6 +14,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import top.yukonga.miuix.kmp.basic.BasicComponent
import top.yukonga.miuix.kmp.basic.BasicComponentColors
Expand Down Expand Up @@ -64,10 +66,13 @@ fun SuperArrow(
rightActions = {
if (rightText != null) {
Text(
modifier = Modifier.widthIn(max = 130.dp),
text = rightText,
fontSize = MiuixTheme.textStyles.body2.fontSize,
color = rightActionColor.color(enabled),
textAlign = TextAlign.End,
overflow = TextOverflow.Ellipsis,
maxLines = 2
)
}
Image(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.rememberTextMeasurer
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
Expand Down Expand Up @@ -180,6 +181,8 @@ fun SuperDropdown(
fontSize = MiuixTheme.textStyles.body2.fontSize,
color = actionColor,
textAlign = TextAlign.End,
overflow = TextOverflow.Ellipsis,
maxLines = 2
)
}
Image(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalHapticFeedback
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.DpSize
import androidx.compose.ui.unit.IntOffset
Expand Down Expand Up @@ -185,6 +186,8 @@ fun SuperSpinner(
fontSize = MiuixTheme.textStyles.body2.fontSize,
color = actionColor,
textAlign = TextAlign.End,
overflow = TextOverflow.Ellipsis,
maxLines = 2
)
}
Image(
Expand Down Expand Up @@ -353,10 +356,8 @@ fun SuperSpinner(
* @param titleColor the color of the title of the [SuperSpinner].
* @param summary the summary of the [SuperSpinner].
* @param summaryColor the color of the summary of the [SuperSpinner].
* @param horizontalPadding the horizontal padding of the [SuperSpinner].
* @param leftAction the action to be shown at the left side of the [SuperSpinner].
* @param insideMargin the [PaddingValues] to be applied inside the [SuperSpinner].
* @param defaultWindowInsetsPadding whether to apply the default window insets padding to the [SuperSpinner].
* @param enabled whether the [SuperSpinner] is enabled.
* @param showValue whether to show the value of the [SuperSpinner].
* @param onSelectedIndexChange the callback to be invoked when the selected index of the [SuperSpinner] is changed.
Expand All @@ -372,10 +373,8 @@ fun SuperSpinner(
titleColor: BasicComponentColors = BasicComponentDefaults.titleColor(),
summary: String? = null,
summaryColor: BasicComponentColors = BasicComponentDefaults.summaryColor(),
horizontalPadding: Dp = 0.dp,
leftAction: @Composable (() -> Unit)? = null,
insideMargin: PaddingValues = BasicComponentDefaults.InsideMargin,
defaultWindowInsetsPadding: Boolean = true,
enabled: Boolean = true,
showValue: Boolean = true,
onSelectedIndexChange: ((Int) -> Unit)?,
Expand Down Expand Up @@ -444,6 +443,8 @@ fun SuperSpinner(
fontSize = MiuixTheme.textStyles.body2.fontSize,
color = actionColor,
textAlign = TextAlign.End,
overflow = TextOverflow.Ellipsis,
maxLines = 2
)
}
Image(
Expand Down