Skip to content

Commit

Permalink
Re: Revert name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
proneon267 committed May 30, 2024
1 parent 6f75e5f commit a88cc13
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
5 changes: 1 addition & 4 deletions android/src/toga_android/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ def native_color(c):
color = CACHE[c]
except KeyError:
color = Color.argb(
int(c.rgba.a * 255),
int(c.rgba.r),
int(c.rgba.g),
int(c.rgba.b),
int(c.rgba.a * 255), int(c.rgba.r), int(c.rgba.g), int(c.rgba.b)
)
CACHE[c] = color

Expand Down
7 changes: 1 addition & 6 deletions gtk/src/toga_gtk/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@ def native_color(c):
try:
color = CACHE[c]
except KeyError:
color = (
c.rgba.r / 255,
c.rgba.g / 255,
c.rgba.b / 255,
c.rgba.a,
)
color = (c.rgba.r / 255, c.rgba.g / 255, c.rgba.b / 255, c.rgba.a)
CACHE[c] = color

return color
5 changes: 1 addition & 4 deletions iOS/src/toga_iOS/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ def native_color(c):
except KeyError:
# Color needs to be retained to be kept in the cache
color = UIColor.colorWithRed(
c.rgba.r / 255,
green=c.rgba.g / 255,
blue=c.rgba.b / 255,
alpha=c.rgba.a,
c.rgba.r / 255, green=c.rgba.g / 255, blue=c.rgba.b / 255, alpha=c.rgba.a
).retain()
CACHE[c] = color

Expand Down

0 comments on commit a88cc13

Please sign in to comment.