File tree 1 file changed +4
-4
lines changed
sdk/python/packages/flet-core/src/flet_core 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -148,10 +148,10 @@ def _before_build_command(self):
148
148
):
149
149
if self .__style is None :
150
150
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
155
155
if self .__style .elevation != self .__elevation :
156
156
self .__style .elevation = self .__elevation
157
157
if self .__style is not None :
You can’t perform that action at this time.
0 commit comments