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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ replay_pid*
*.DS_Store
*app/release/

Build/
Build/
build/reports/problems/problems-report.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import androidx.core.content.ContextCompat
import androidx.core.graphics.ColorUtils
import androidx.glance.Image
import androidx.glance.ImageProvider
import com.google.android.material.color.MaterialColors
import com.sameerasw.essentials.R

class BatteriesWidget : GlanceAppWidget() {
Expand Down Expand Up @@ -155,6 +156,7 @@ class BatteriesWidget : GlanceAppWidget() {
val baseError = GlanceTheme.colors.error.getColor(configContext).toArgb()
val onSurface = GlanceTheme.colors.onSurface.getColor(configContext).toArgb()
val surfaceColor = GlanceTheme.colors.surface.getColor(configContext).toArgb()
val warning = MaterialColors.harmonizeWithPrimary(configContext, android.graphics.Color.parseColor("#FFC107"))

val isNightMode = (systemConfig.uiMode and
android.content.res.Configuration.UI_MODE_NIGHT_MASK) ==
Expand All @@ -164,7 +166,7 @@ class BatteriesWidget : GlanceAppWidget() {
val colors = ThemeColors(
primary = basePrimary,
error = baseError,
warning = android.graphics.Color.parseColor("#FFC107"),
warning = warning,
track = ColorUtils.setAlphaComponent(onSurface, 30),
surface = surfaceColor,
iconTint = onSurface
Expand Down