Merge "[flexiglass] Fix Shade Header element colors in light theme" into main
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt
index 12b07a3..c5c48e6 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/ShadeHeader.kt
@@ -32,6 +32,7 @@
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.widthIn
+import androidx.compose.material3.ColorScheme
import androidx.compose.material3.windowsizeclass.WindowWidthSizeClass
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
@@ -40,6 +41,7 @@
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
+import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.TransformOrigin
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.layout.Layout
@@ -97,6 +99,11 @@
val CollapsedHeight = 48.dp
val ExpandedHeight = 120.dp
}
+
+ object Colors {
+ val ColorScheme.shadeHeaderText: Color
+ get() = Color.White
+ }
}
@Composable
@@ -325,7 +332,10 @@
val animatedScale by animateElementFloatAsState(scale, ClockScale, canOverflow = false)
AndroidView(
factory = { context ->
- Clock(ContextThemeWrapper(context, R.style.TextAppearance_QS_Status), null)
+ Clock(
+ ContextThemeWrapper(context, R.style.Theme_SystemUI_QuickSettings_Header),
+ null,
+ )
},
modifier =
modifier
@@ -430,11 +440,16 @@
AndroidView(
factory = { context ->
- val iconContainer = StatusIconContainer(context, null)
+ val themedContext =
+ ContextThemeWrapper(context, R.style.Theme_SystemUI_QuickSettings_Header)
+ val iconContainer = StatusIconContainer(themedContext, null)
val iconManager = createTintedIconManager(iconContainer, StatusBarLocation.QS)
iconManager.setTint(
- Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimary),
- Utils.getColorAttrDefaultColor(context, android.R.attr.textColorPrimaryInverse),
+ Utils.getColorAttrDefaultColor(themedContext, android.R.attr.textColorPrimary),
+ Utils.getColorAttrDefaultColor(
+ themedContext,
+ android.R.attr.textColorPrimaryInverse
+ ),
)
statusBarIconController.addIconGroup(iconManager)
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/VariableDayDate.kt b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/VariableDayDate.kt
index 799dbd6..5e107c6 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/VariableDayDate.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/shade/ui/composable/VariableDayDate.kt
@@ -4,9 +4,9 @@
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
-import androidx.compose.runtime.getValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.Layout
+import com.android.systemui.shade.ui.composable.ShadeHeader.Colors.shadeHeaderText
import com.android.systemui.shade.ui.viewmodel.ShadeHeaderViewModel
@Composable
@@ -23,16 +23,16 @@
{
Text(
text = longerText.value,
- style = MaterialTheme.typography.titleSmall,
- color = MaterialTheme.colorScheme.onBackground,
+ style = MaterialTheme.typography.bodyMedium,
+ color = MaterialTheme.colorScheme.shadeHeaderText,
maxLines = 1,
)
},
{
Text(
text = shorterText.value,
- style = MaterialTheme.typography.titleSmall,
- color = MaterialTheme.colorScheme.onBackground,
+ style = MaterialTheme.typography.bodyMedium,
+ color = MaterialTheme.colorScheme.shadeHeaderText,
maxLines = 1,
)
},