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

@@ -387,6 +387,10 @@
"action_menu_round_background_color": {
"name": "Action Menu Round Background Color",
"description": "Changes Snapchats chat action menu round background color\nInput a hex color code"
},
"camera_grid_lines": {
"name": "Camera Gridlines Color",
"description": "Changes Snapchats Gridlines color on the Camera Preview \nInput a hex color code\nNote: Enable the grid on the my camera settings"
}
}
},
@@ -480,7 +484,7 @@
},
"message_indicators": {
"name": "Message Indicators",
"description": "Adds specific indicators icons to messages\nNote: indicators might not be 100% accurate"
"description": "Adds specific indicators icons to messages\nNote: Indicators might not be 100% accurate"
},
"stealth_mode_indicator": {
"name": "Stealth Mode Indicator",
@@ -904,7 +908,7 @@
},
"account_switcher": {
"name": "Account Switcher",
"description": "Allows you to switch between accounts without logging out\nLong press on the search icon next to your Bitmoji profile to open the menu\nNote: this feature is experimental and will likely change in the future",
"description": "Allows you to switch between accounts without logging out\nLong press on the search icon next to your Bitmoji profile to open the menu\nNote: This feature is experimental and will likely change in the future",
"properties": {
"auto_backup_current_account": {
"name": "Auto Backup Current Account",
@@ -940,7 +944,7 @@
},
"best_friend_pinning": {
"name": "Best Friend Pinning",
"description": "Allows you to pin a friend as your number one best friend. Note: only you can see your pinned best friend"
"description": "Allows you to pin a friend as your number one best friend. Note: Only you can see your pinned best friend"
},
"e2ee": {
"name": "End-To-End Encryption",

View File

@@ -28,7 +28,8 @@ class UserInterfaceTweaks : ConfigContainer() {
val backgroundColor = string("background_color") { inputCheck = checkInputColor }
val backgroundColorSurface = string("background_color_surface") { inputCheck = checkInputColor }
val actionMenuBackgroundColor = string("action_menu_background_color") { inputCheck = checkInputColor }
val actionMenuRoundBackgroundColor = string("action_menu_round_background_color") { inputCheck = checkInputColor }
val actionMenuRoundBackgroundColor = string("action_menu_round_background_color") { inputCheck = checkInputColor }
val cameraGridLines = string("camera_grid_lines") { inputCheck = checkInputColor }
}
val friendFeedMenuButtons = multiple(

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)
}
}
}
}