Hide brush settings when other tools are active

This commit is contained in:
Naveen 2022-10-12 02:41:31 +05:30
parent 7d1ee2fc21
commit 5be7d50402
1 changed files with 8 additions and 0 deletions

View File

@ -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 -> {