From 9ff0c7e5c77b46784f810542d6b437e7fa5977ce Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 29 Dec 2021 10:41:38 +0100 Subject: [PATCH] disable the eyedropper if a brush or bg color is picked --- .../simplemobiletools/draw/pro/activities/MainActivity.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt index f8db247..474280e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt @@ -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)