rename headlineContent to content

This commit is contained in:
PranshulGG committed 2026-08-16 15:00:14 +05:30
1 parent a156da9ac9
commit 4e698f21e9
15 files changed
+17 -15

No files matched your search

@@ -40,7 +40,7 @@ fun ActionTile(
colors = ListItemDefaults.colors(
containerColor = if (selected) MaterialTheme.colorScheme.secondaryContainer else if (danger) MaterialTheme.colorScheme.errorContainer else itemBgColor
),
headlineContent = {
content = {
Text(
headline,
color = if (selected) MaterialTheme.colorScheme.onSecondaryContainer else if (danger) MaterialTheme.colorScheme.onErrorContainer else MaterialTheme.colorScheme.onSurface,
@@ -41,7 +41,7 @@ fun CategoryTile(
colors = ListItemDefaults.colors(
containerColor = itemBgColor
),
headlineContent = { Text(headline) },
content = { Text(headline) },
supportingContent = {
if (description != null) {
Text(description)
@@ -46,7 +46,7 @@ fun DialogSliderTile(
containerColor = itemBgColor
),
leadingContent = leading,
headlineContent = { Text(headline) },
content = { Text(headline) },
supportingContent = {
if (description != null) {
Text(
@@ -38,7 +38,7 @@ fun DialogTextFieldTile(
containerColor = itemBgColor
),
leadingContent = leading,
headlineContent = { Text(headline) },
content = { Text(headline) },
supportingContent = {
if (description != null) Text(
description,
@@ -47,7 +47,7 @@ fun SwitchTile(
containerColor = itemBgColor
),
leadingContent = leading,
headlineContent = { Text(headline) },
content = { Text(headline) },
supportingContent = {
if (description != null) Text(description)
},
@@ -114,7 +114,7 @@ fun SingleSwitchTile(
},
leadingContent = leading,
headlineContent = { Text(headline) },
content = { Text(headline) },
supportingContent = {
if (description != null) Text(description)
},
@@ -30,7 +30,7 @@ fun TextTile(
colors = ListItemDefaults.colors(
containerColor = itemBgColor
),
headlineContent = { Text(headline) },
content = { Text(headline) },
supportingContent = {
if (description != null) {
Text(
@@ -152,7 +152,7 @@ fun HumidityScreen(navController: NavController, index: Int = 0, locationId: Str
contentColor = Color.White
)
},
headlineContent = { Text(dewPointScaleText[index]) },
content = { Text(dewPointScaleText[index]) },
trailingContent = {
Text(
if (units.tempUnit == TemperatureUnit.FAHRENHEIT) pair.second else pair.first,
@@ -123,7 +123,7 @@ fun UvIndexScreen(navController: NavController, index: Int = 0, locationId: Stri
contentColor = Color.White
)
},
headlineContent = { Text(it.toLabel(context)) },
content = { Text(it.toLabel(context)) },
trailingContent = {
Text(
getUvIndexScaleFor(it),
@@ -129,7 +129,7 @@ fun VisibilityScreen(navController: NavController, index: Int = 0, locationId: S
scale.forEach {
ListItem(
colors = ListItemDefaults.colors(containerColor = Color.Transparent),
headlineContent = { Text(it.headline) },
content = { Text(it.headline) },
supportingContent = { Text(it.description) },
trailingContent = {
Text(
@@ -177,7 +177,7 @@ private fun UseDeviceLocationCard(onClick: () -> Unit, isLoading: Boolean = fals
}
}
},
headlineContent = {
content = {
Text(
stringResource(R.string.location_use_current),
color = MaterialTheme.colorScheme.onSurface
@@ -66,7 +66,7 @@ fun AlertsSection(
size = 32.dp
)
},
headlineContent = { Text(it.event) },
content = { Text(it.event) },
supportingContent = {
if (it.effective != null && it.expires != null) {
Text("${formatter(it.effective)} • ${formatter(it.expires)}")
@@ -154,7 +154,7 @@ private fun DonateListItem(headline: String, description: String, icon: Int, onC
ListItem(
colors = ListItemDefaults.colors(containerColor = Color.Transparent),
leadingContent = { WeatherIconBox(icon, size = 28.dp) },
headlineContent = { Text(headline) },
content = { Text(headline) },
supportingContent = { Text(description) },
modifier = Modifier
.clickable(onClick = onClick)
@@ -163,7 +163,7 @@ private fun AppVersionTile(
colors = ListItemDefaults.colors(
containerColor = MaterialTheme.colorScheme.tertiaryContainer
),
headlineContent = {
content = {
Text(
"WeatherMaster",
color = MaterialTheme.colorScheme.onTertiaryContainer,
@@ -71,7 +71,7 @@ fun LocationItem(
WeatherIconBox(icon, size = 34.dp)
}
},
headlineContent = {
content = {
if (isDefault) TitleForDefaultLocation(
contentColor,
title
@@ -1,5 +1,6 @@
package com.pranshulgg.weather_master_app.widgets.weather.ui.variants
import android.annotation.SuppressLint
import androidx.compose.runtime.Composable
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
@@ -32,6 +33,7 @@ import com.pranshulgg.weather_master_app.widgets.ui.colors.WidgetColors
import com.pranshulgg.weather_master_app.widgets.ui.colors.WidgetTheme
import com.pranshulgg.weather_master_app.widgets.weather.components.WidgetHourlyItem
@SuppressLint("RestrictedApi")
@Composable
fun WeatherWidgetLarge(
state: WidgetWeather?,