File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change
1
+ The default background color of `toga.Label ` on iOS now correctly displays a transparent background, instead of a black background.
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ def __init__(self, interface):
13
13
self .native = None
14
14
self .create ()
15
15
16
+ # Override this attribute to set a different default background
17
+ # color for a given widget.
18
+ self ._default_background_color = self .native .backgroundColor
19
+
16
20
@abstractmethod
17
21
def create (self ): ...
18
22
@@ -87,7 +91,9 @@ def set_color(self, color):
87
91
pass
88
92
89
93
def set_background_color (self , color ):
90
- self .native .backgroundColor = None if color is None else native_color (color )
94
+ self .native .backgroundColor = (
95
+ self ._default_background_color if color is None else native_color (color )
96
+ )
91
97
92
98
# INTERFACE
93
99
def add_child (self , child ):
You can’t perform that action at this time.
0 commit comments