disable the eyedropper if a brush or bg color is picked
This commit is contained in:
parent
4dec99bc9d
commit
9ff0c7e5c7
|
@ -519,12 +519,20 @@ class MainActivity : SimpleActivity(), CanvasListener {
|
|||
private fun pickColor() {
|
||||
ColorPickerDialog(this, color) { wasPositivePressed, color ->
|
||||
if (wasPositivePressed) {
|
||||
if (isEyeDropperOn) {
|
||||
eyeDropperClicked()
|
||||
}
|
||||
|
||||
setColor(color)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun setBackgroundColor(pickedColor: Int) {
|
||||
if (isEyeDropperOn) {
|
||||
eyeDropperClicked()
|
||||
}
|
||||
|
||||
val contrastColor = pickedColor.getContrastColor()
|
||||
undo.applyColorFilter(contrastColor)
|
||||
eraser.applyColorFilter(contrastColor)
|
||||
|
|
Loading…
Reference in New Issue