From 5be7d5040281f066be5f19c8189067cc8d58b0cf Mon Sep 17 00:00:00 2001 From: Naveen Date: Wed, 12 Oct 2022 02:41:31 +0530 Subject: [PATCH] Hide brush settings when other tools are active --- .../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 c38c6f9..6e1a342 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 @@ -407,6 +407,8 @@ class MainActivity : SimpleActivity(), CanvasListener { } private fun updateButtonStates() { + hideBrushSettings(isEyeDropperOn || isBucketFillOn) + arrayOf( eraser to isEraserOn, eye_dropper to isEyeDropperOn, @@ -428,6 +430,12 @@ class MainActivity : SimpleActivity(), CanvasListener { } } + private fun hideBrushSettings(hide: Boolean) { + arrayOf(stroke_width_bar, stroke_width_preview).forEach { + it.beGoneIf(hide) + } + } + private fun confirmImage() { when { isEditIntent -> {