File tree 1 file changed +10
-15
lines changed
sdk/python/packages/flet-core/src/flet_core 1 file changed +10
-15
lines changed Original file line number Diff line number Diff line change 9
9
from flet_core .tooltip import TooltipValue
10
10
from flet_core .types import (
11
11
AnimationValue ,
12
+ ClipBehavior ,
12
13
OffsetValue ,
14
+ OptionalControlEventCallable ,
13
15
ResponsiveNumber ,
14
16
RotateValue ,
15
17
ScaleValue ,
16
- ClipBehavior ,
17
18
UrlTarget ,
18
- OptionalControlEventCallable ,
19
19
)
20
20
from flet_core .utils import deprecated
21
21
@@ -160,19 +160,14 @@ def before_update(self):
160
160
if any ([self .__color , self .__bgcolor , self .__elevation ]):
161
161
self .__style = self .__style or ButtonStyle ()
162
162
if self .__style :
163
- self .__style .color = (
164
- self .__style .color if self .__style .color is not None else self .color
165
- )
166
- self .__style .bgcolor = (
167
- self .__style .bgcolor
168
- if self .__style .bgcolor is not None
169
- else self .bgcolor
170
- )
171
- self .__style .elevation = (
172
- self .__style .elevation
173
- if self .__style .elevation is not None
174
- else self .elevation
175
- )
163
+ if self .__color is not None :
164
+ self .__style .color = self .__color
165
+
166
+ if self .__bgcolor is not None :
167
+ self .__style .bgcolor = self .__bgcolor
168
+
169
+ if self .__elevation is not None :
170
+ self .__style .elevation = self .__elevation
176
171
self .__style .side = self ._wrap_attr_dict (self .__style .side )
177
172
self .__style .shape = self ._wrap_attr_dict (self .__style .shape )
178
173
self .__style .padding = self ._wrap_attr_dict (self .__style .padding )
You can’t perform that action at this time.
0 commit comments