Compare commits

...
4 Commits
Author SHA1 Message Date
meoware.exe a7fa8f7d30 Merge pull request #81 from meowarex/dev
Forgot .version (again)..
2026-08-13 01:08:17 +10:00
meowarex 625d012e17 Forgot .version (again).. 2026-08-12 15:07:46 +00:00
meoware.exe 2cb0e1a67e Merge pull request #80 from meowarex/dev
Revert to Legacy Sliders <3
2026-08-13 00:53:30 +10:00
meowarex b1f50d4098 Revert to Legacy Sliders <3 2026-08-12 14:45:39 +00:00
5 changed files with 32 additions and 100 deletions
+1 -1
View File
@@ -1 +1 @@
1.0.0 1.0.1
+2 -2
View File
@@ -31,8 +31,8 @@ android {
defaultConfig { defaultConfig {
minSdk = 24 minSdk = 24
targetSdk = 36 targetSdk = 36
versionCode = 10_05_02 versionCode = 53
versionName = "1.5.2" versionName = "1.0.1"
vectorDrawables { vectorDrawables {
useSupportLibrary = true useSupportLibrary = true
@@ -114,7 +114,7 @@ fun RadiantTextField(
} }
/** /**
* Slider with a gradient and glow. * Slider. (i prefer the old on tbh so i reverted it back <3)
*/ */
@Composable @Composable
fun RadiantSlider( fun RadiantSlider(
@@ -124,12 +124,10 @@ fun RadiantSlider(
valueRange: ClosedFloatingPointRange<Float> = 0f..1f, valueRange: ClosedFloatingPointRange<Float> = 0f..1f,
steps: Int = 0, steps: Int = 0,
enabled: Boolean = true, enabled: Boolean = true,
showStopIndicator: Boolean = true,
onValueChangeFinished: (() -> Unit)? = null, onValueChangeFinished: (() -> Unit)? = null,
) { ) {
val scheme = MaterialTheme.colorScheme if (showStopIndicator) {
val interaction = remember(::MutableInteractionSource)
if (radiantStyle.native) {
Slider( Slider(
value = value, value = value,
onValueChange = onValueChange, onValueChange = onValueChange,
@@ -139,9 +137,7 @@ fun RadiantSlider(
enabled = enabled, enabled = enabled,
modifier = modifier, modifier = modifier,
) )
return } else {
}
Slider( Slider(
value = value, value = value,
onValueChange = onValueChange, onValueChange = onValueChange,
@@ -149,41 +145,10 @@ fun RadiantSlider(
valueRange = valueRange, valueRange = valueRange,
steps = steps, steps = steps,
enabled = enabled, enabled = enabled,
interactionSource = interaction,
modifier = modifier, modifier = modifier,
track = { state -> track = { SliderDefaults.Track(sliderState = it, drawStopIndicator = null) },
val fraction = if (valueRange.endInclusive > valueRange.start) {
((state.value - valueRange.start) / (valueRange.endInclusive - valueRange.start))
.coerceIn(0f, 1f)
} else 0f
Box(
modifier = Modifier
.fillMaxWidth()
.height(6.dp)
.clip(CircleShape)
.background(scheme.surfaceContainerHighest),
) {
Box(
modifier = Modifier
.fillMaxWidth(fraction)
.fillMaxHeight()
.clip(CircleShape)
.background(accentBrush),
) )
} }
},
thumb = {
Box(
modifier = Modifier
.glow(scheme.primary, 10.dp, CircleShape, alpha = 0.6f)
.size(20.dp)
.clip(CircleShape)
.background(scheme.onPrimary, CircleShape)
.border(3.dp, scheme.primary, CircleShape),
)
},
)
} }
/** /**
@@ -270,37 +235,3 @@ fun RadiantSegmented(
} }
/** something.. */ /** something.. */
@Composable
fun RadiantLabeledSlider(
label: String,
value: Float,
onValueChange: (Float) -> Unit,
modifier: Modifier = Modifier,
valueRange: ClosedFloatingPointRange<Float> = 0f..1f,
steps: Int = 0,
trailingText: String? = null,
) {
Column(modifier = modifier.fillMaxWidth()) {
Row(verticalAlignment = Alignment.CenterVertically) {
Text(
text = label,
style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.weight(1f),
)
if (trailingText != null) {
Text(
text = trailingText,
style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.primary,
)
}
}
RadiantSlider(
value = value,
onValueChange = onValueChange,
valueRange = valueRange,
steps = steps,
)
}
}
@@ -354,6 +354,7 @@ private fun SliderOptionRow(
value = value, value = value,
onValueChange = onValueChange, onValueChange = onValueChange,
valueRange = valueRange, valueRange = valueRange,
showStopIndicator = false,
) )
} }
} }
@@ -33,13 +33,13 @@ private val Rose80 = Color(0xFFFFAFCC)
private val Rose90 = Color(0xFFFFD9E4) private val Rose90 = Color(0xFFFFD9E4)
private val Rose95 = Color(0xFFFFECF1) private val Rose95 = Color(0xFFFFECF1)
// ── Violet (secondary) ─────────────────────────────────────────────────────── // ── Dusty rose (secondary) ───────────────────────────────────────────────────
private val Violet10 = Color(0xFF25004E) private val DustyRose10 = Color(0xFF2B0D18)
private val Violet20 = Color(0xFF3D177A) private val DustyRose20 = Color(0xFF43202B)
private val Violet30 = Color(0xFF553194) private val DustyRose30 = Color(0xFF5C3541)
private val Violet40 = Color(0xFF6E4BAF) private val DustyRose40 = Color(0xFF774C58)
private val Violet80 = Color(0xFFD6BBFF) private val DustyRose80 = Color(0xFFE4BCC8)
private val Violet90 = Color(0xFFECDCFF) private val DustyRose90 = Color(0xFFF5DCE4)
// ── Aqua (tertiary) ────────────────────────────────────────────────────────── // ── Aqua (tertiary) ──────────────────────────────────────────────────────────
private val Aqua10 = Color(0xFF00201F) private val Aqua10 = Color(0xFF00201F)
@@ -89,10 +89,10 @@ val RadiantDarkColorScheme: ColorScheme = darkColorScheme(
onPrimaryContainer = Rose90, onPrimaryContainer = Rose90,
inversePrimary = Rose40, inversePrimary = Rose40,
secondary = Violet80, secondary = DustyRose80,
onSecondary = Violet20, onSecondary = DustyRose20,
secondaryContainer = Violet30, secondaryContainer = DustyRose30,
onSecondaryContainer = Violet90, onSecondaryContainer = DustyRose90,
tertiary = Aqua80, tertiary = Aqua80,
onTertiary = Aqua20, onTertiary = Aqua20,
@@ -134,10 +134,10 @@ val RadiantLightColorScheme: ColorScheme = lightColorScheme(
onPrimaryContainer = Rose10, onPrimaryContainer = Rose10,
inversePrimary = Rose80, inversePrimary = Rose80,
secondary = Violet40, secondary = DustyRose40,
onSecondary = Neutral100, onSecondary = Neutral100,
secondaryContainer = Violet90, secondaryContainer = DustyRose90,
onSecondaryContainer = Violet10, onSecondaryContainer = DustyRose10,
tertiary = Aqua40, tertiary = Aqua40,
onTertiary = Neutral100, onTertiary = Neutral100,