From 57620c75a5144a708121b7602d479723655bf79e Mon Sep 17 00:00:00 2001 From: proneon267 Date: Fri, 21 Feb 2025 17:11:41 -0800 Subject: [PATCH] Apply suggestions from review --- android/src/toga_android/widgets/base.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/android/src/toga_android/widgets/base.py b/android/src/toga_android/widgets/base.py index 82b78451e0..6ed5c19830 100644 --- a/android/src/toga_android/widgets/base.py +++ b/android/src/toga_android/widgets/base.py @@ -125,16 +125,17 @@ def set_font(self, font): # By default, font can't be changed pass - # Although setBackgroundColor is defined in the View base class, we can't use it as - # a default implementation because it often overwrites other aspects of the widget's - # appearance. So each widget must decide how to implement this method, possibly - # using one of the utility functions below. def set_background_color(self, color): self.native_toplevel.setBackground( None if color in (None, TRANSPARENT) else ColorDrawable(native_color(color)) ) def set_background_filter(self, color): + # Although setBackgroundColor is defined in the View base class, we can't + # use it as a default implementation on some widgets(e.g. Button), because + # it often overwrites other aspects of the widget's appearance. For example, + # when setBackgroundColor is used on a Button, it changes the background behind + # the button rather than the button's actual color. self.native.getBackground().setColorFilter( None if color is None