Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove erroneous note about _default_background_color override behavior on iOS #3125

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/3125.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
On iOS, an erroneous note stating that widgets can override their system-assigned default background color, has now been removed.
9 changes: 7 additions & 2 deletions iOS/src/toga_iOS/widgets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ def __init__(self, interface):
self.native = None
self.create()

# Override this attribute to set a different default background
# color for a given widget.
# Many widgets have a "transparent" background; however, some widgets use
# UIColor.ClearColor, and some use UIExtendedGrayColorSpace 0 0, which has
# slightly different color mixing characteristics. Widgets like TextInput use
# `None` as their initial background color, so that always adapts to light/dark
# mode. Preserve the initial background color on the freshly created widget so
# that we can reset back to that color when background_color is set to None. See
# #3104 for details.
self._default_background_color = self.native.backgroundColor
proneon267 marked this conversation as resolved.
Show resolved Hide resolved

@abstractmethod
Expand Down
Loading