toggle button shapes

This commit is contained in:
PranshulGG committed 2026-08-15 18:03:05 +05:30
1 parent 477f327ad1
commit 98bb99d164
6 files changed
+5 -8

No files matched your search

@@ -1,5 +1,6 @@
package com.pranshulgg.weather_master_app.data.local.mapper.weather
import com.pranshulgg.weather_master_app.core.model.domain.location.Location
import com.pranshulgg.weather_master_app.core.model.domain.weather.WeatherCurrent
import com.pranshulgg.weather_master_app.core.model.domain.weather.WeatherDaily
import com.pranshulgg.weather_master_app.core.model.domain.weather.WeatherHourly
@@ -36,11 +37,11 @@ fun WeatherCurrent.toCurrentWeatherEntity(
@OptIn(ExperimentalUuidApi::class)
fun List<WeatherHourly>.toHourlyWeatherEntity(
locationId: String
location: Location
): List<HourlyWeatherEntity> =
map { item ->
HourlyWeatherEntity(
locationId = locationId,
locationId = location.id,
temperature = item.temperature,
windSpeed = item.windSpeed,
windDirection = item.windDirection,
@@ -53,7 +54,8 @@ fun List<WeatherHourly>.toHourlyWeatherEntity(
visibility = item.visibility,
pressureMsl = item.pressureMsl,
humidity = item.humidity,
dewPoint = item.dewPoint
dewPoint = item.dewPoint,
cachedSource = location.source
)
}
@@ -168,7 +168,6 @@ fun SelectableThemeColors(onThemeColorChanged: (String) -> Unit) {
selected = variant
},
modifier = Modifier.semantics { role = Role.RadioButton },
shapes = ToggleButtonDefaults.shapes(),
colors = ToggleButtonDefaults.toggleButtonColors(
checkedContainerColor = MaterialTheme.colorScheme.tertiary,
checkedContentColor = MaterialTheme.colorScheme.onTertiary,
@@ -107,7 +107,6 @@ fun UvIndexWidgetConfig(onDone: (WidgetConfig) -> Unit = {}) {
selectedVariant = item
},
modifier = Modifier.semantics { role = Role.RadioButton },
shapes = ToggleButtonDefaults.shapes(),
colors = ToggleButtonDefaults.toggleButtonColors(
checkedContainerColor = MaterialTheme.colorScheme.tertiary,
checkedContentColor = MaterialTheme.colorScheme.onTertiary,
@@ -135,7 +135,6 @@ fun WeatherWidgetConfig(onDone: (WidgetConfig) -> Unit = {}) {
selectedVariant = item
},
modifier = Modifier.semantics { role = Role.RadioButton },
shapes = ToggleButtonDefaults.shapes(),
colors = ToggleButtonDefaults.toggleButtonColors(
checkedContainerColor = MaterialTheme.colorScheme.tertiary,
checkedContentColor = MaterialTheme.colorScheme.onTertiary,
@@ -129,7 +129,6 @@ fun Weather4Config(onDone: (WidgetConfig) -> Unit = {}) {
selectedVariant = item
},
modifier = Modifier.semantics { role = Role.RadioButton },
shapes = ToggleButtonDefaults.shapes(),
colors = ToggleButtonDefaults.toggleButtonColors(
checkedContainerColor = MaterialTheme.colorScheme.tertiary,
checkedContentColor = MaterialTheme.colorScheme.onTertiary,
@@ -126,7 +126,6 @@ fun WeatherHorizontalConfig(onDone: (WidgetConfig) -> Unit = {}) {
selectedVariant = item
},
modifier = Modifier.semantics { role = Role.RadioButton },
shapes = ToggleButtonDefaults.shapes(),
colors = ToggleButtonDefaults.toggleButtonColors(
checkedContainerColor = MaterialTheme.colorScheme.tertiary,
checkedContentColor = MaterialTheme.colorScheme.onTertiary,