feat(core/colors): camera gridlines (#977)

Co-authored-by: auth <64337177+authorisation@users.noreply.github.com>
This commit is contained in:
Jacob Thomas
2024-05-04 15:11:58 +01:00
committed by GitHub
parent fcf82de988
commit e019ceee74
3 changed files with 25 additions and 5 deletions

View File

@@ -31,7 +31,9 @@ class CustomizeUI: Feature("Customize UI", loadParams = FeatureLoadParams.ACTIVI
val effectiveBackgroundColorSurface by lazy { parseColor(customizeUIConfig.backgroundColorSurface.get()) }
val effectiveActionMenuBackgroundColor by lazy { parseColor(customizeUIConfig.actionMenuBackgroundColor.get()) }
val effectiveActionMenuRoundBackgroundColor by lazy { parseColor(customizeUIConfig.actionMenuRoundBackgroundColor.get()) }
val effectiveCameraGridLines by lazy { parseColor(customizeUIConfig.cameraGridLines.get()) }
val attributeCache = mutableMapOf<String, Int>()
fun getAttribute(name: String): Int {
@@ -72,6 +74,10 @@ class CustomizeUI: Feature("Customize UI", loadParams = FeatureLoadParams.ACTIVI
ephemeralHook("getColor", effectiveTextColor ?: return@hook)
}
getAttribute("sigColorTextSecondary") -> {
ephemeralHook("getColor", effectiveTextColor ?: return@hook)
}
getAttribute("sigColorBackgroundMain") -> {
ephemeralHook("getColor", effectiveBackgroundColor ?: return@hook)
}
@@ -87,21 +93,30 @@ class CustomizeUI: Feature("Customize UI", loadParams = FeatureLoadParams.ACTIVI
getAttribute("actionSheetRoundedBackgroundDrawable") -> {
ephemeralHook("getDrawable", ColorDrawable(effectiveActionMenuRoundBackgroundColor ?: return@hook))
}
getAttribute("sigColorChatActivity") -> {
ephemeralHook("getColor", effectivesendAndReceivedTextColor ?: return@hook)
}
getAttribute("sigColorChatChat") -> {
ephemeralHook("getColor", effectivesendAndReceivedTextColor ?: return@hook)
}
getAttribute("sigColorChatPendingSending") -> {
ephemeralHook("getColor", effectivesendAndReceivedTextColor ?: return@hook)
}
getAttribute("sigColorChatSnapWithSound") -> {
ephemeralHook("getColor", effectivesendAndReceivedTextColor ?: return@hook)
}
getAttribute("sigColorChatSnapWithoutSound") -> {
ephemeralHook("getColor", effectivesendAndReceivedTextColor ?: return@hook)
}
getAttribute("sigExceptionColorCameraGridLines") -> {
ephemeralHook("getColor", effectiveCameraGridLines ?: return@hook)
}
}
}
}