Skip to content

Commit 5b825c8

Browse files
committed
adjust the text color on Bright Display appropriately
1 parent 3348740 commit 5b825c8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/flashlight/activities/BrightDisplayActivity.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ class BrightDisplayActivity : SimpleActivity() {
3030
}) { wasPositivePressed, color ->
3131
if (wasPositivePressed) {
3232
config.brightDisplayColor = color
33+
34+
val contrastColor = color.getContrastColor()
35+
bright_display_change_color.setTextColor(contrastColor)
36+
bright_display_change_color.background.applyColorFilter(contrastColor)
3337
} else {
3438
setBackgroundColor(config.brightDisplayColor)
3539
}

0 commit comments

Comments
 (0)