Skip to content

Commit 684bf1f

Browse files
committed
Fix disabled color of FilledButtons
Fix #1754
1 parent 1a9a356 commit 684bf1f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sdk/python/packages/flet-core/src/flet_core/elevated_button.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ def _before_build_command(self):
148148
):
149149
if self.__style is None:
150150
self.__style = ButtonStyle()
151-
if self.__style.color != self.__color and not self.disabled:
152-
self.__style.color = self.__color
153-
if self.__style.bgcolor != self.__bgcolor and not self.disabled:
154-
self.__style.bgcolor = self.__bgcolor
151+
if self.__style.color != self.__color or self.disabled:
152+
self.__style.color = self.__color if not self.disabled else None
153+
if self.__style.bgcolor != self.__bgcolor or self.disabled:
154+
self.__style.bgcolor = self.__bgcolor if not self.disabled else None
155155
if self.__style.elevation != self.__elevation:
156156
self.__style.elevation = self.__elevation
157157
if self.__style is not None:

0 commit comments

Comments
 (0)