Color the icon itself, not the background
This commit is contained in:
parent
5be7d50402
commit
2fecf237a3
|
@ -40,6 +40,7 @@ import java.io.ByteArrayOutputStream
|
|||
import java.io.File
|
||||
import java.io.OutputStream
|
||||
|
||||
|
||||
class MainActivity : SimpleActivity(), CanvasListener {
|
||||
private val PICK_IMAGE_INTENT = 1
|
||||
private val SAVE_IMAGE_INTENT = 2
|
||||
|
@ -416,16 +417,10 @@ class MainActivity : SimpleActivity(), CanvasListener {
|
|||
).forEach {
|
||||
val view = it.first
|
||||
val enabled = it.second
|
||||
|
||||
view.apply {
|
||||
if (enabled) {
|
||||
val primaryColor = getProperPrimaryColor()
|
||||
background = ColorDrawable(primaryColor).apply { alpha = 220 }
|
||||
applyColorFilter(primaryColor.getContrastColor())
|
||||
view.applyColorFilter(getProperPrimaryColor())
|
||||
} else {
|
||||
background = null
|
||||
applyColorFilter(config.canvasBackgroundColor.getContrastColor())
|
||||
}
|
||||
view.applyColorFilter(config.canvasBackgroundColor.getContrastColor())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue