Revert Button.isEnabled getter

This commit is contained in:
Loof 2025-09-18 18:01:35 +02:00
parent 09ab647a79
commit f40cd771ef

View File

@ -80,12 +80,7 @@ fun Button.enable() {
* which is more appropriate to toggle On/Off buttons, while this one is good for 'click-to-do-something' buttons.
*/
var Button.isEnabled: Boolean
get() = when (touchable) {
Touchable.enabled -> true
Touchable.disabled -> false
// idk what to do here
Touchable.childrenOnly -> throw IllegalStateException()
}
get() = touchable == Touchable.enabled
set(value) = if (value) enable() else disable()
fun colorFromHex(hexColor: Int): Color {