-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Fix context menu button color on Android when textButtonTheme is set #133271
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
Fix context menu button color on Android when textButtonTheme is set #133271
Conversation
fed4fa2 to
a4e0bcc
Compare
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. Changes reported for pull request #133271 at sha a4e0bcca9c16282ae2bf0275f84d5a1e228b1fcc |
justinmc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One idea about how to simplify this, but if I'm wrong then it looks fine as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we supposed to use testWidgetsWithLeakTracking for everything now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about that. @polina-c do you have any thoughts on when we should use testWidgetsWithLeakTracing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if you just hardcode this backgroundColor to transparent?
In my context menu color PR, I set the context menu's background color to surface on the TextSelectionToolbar under the assumption that these TextSelectionToolbarButtons would be transparent and so look like the color behind them. It looks like the problem in this issue is that setting textButtonTheme's backgroundColor changes the buttons to be non-transparent.
Just a hunch, let me know if it works. If so, maybe it's a preferable solution since the logic about the color of these buttons isn't stored in two places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense! Changing the backgroundColor to Colors.transparent works as expected.
865a025 to
78d3b75
Compare
justinmc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
flutter/flutter@ec387a4...6c95737 2023-08-29 [email protected] Roll Flutter Engine from d84763e04496 to 65438c7bb46a (1 revision) (flutter/flutter#133563) 2023-08-29 [email protected] Roll Flutter Engine from 0625049b5ee3 to d84763e04496 (6 revisions) (flutter/flutter#133559) 2023-08-29 [email protected] Roll Flutter Engine from c2ec683c4ea8 to 0625049b5ee3 (2 revisions) (flutter/flutter#133538) 2023-08-29 [email protected] Roll Flutter Engine from 3d1faae1bc2f to c2ec683c4ea8 (4 revisions) (flutter/flutter#133535) 2023-08-29 [email protected] Roll Flutter Engine from c7c61ff9732c to 3d1faae1bc2f (1 revision) (flutter/flutter#133530) 2023-08-29 [email protected] Fix bug in setPreferredOrientations example (flutter/flutter#133503) 2023-08-29 [email protected] Roll Flutter Engine from 9778c2cb1d51 to c7c61ff9732c (2 revisions) (flutter/flutter#133527) 2023-08-29 [email protected] Roll Flutter Engine from ffda7e3cfc7f to 9778c2cb1d51 (1 revision) (flutter/flutter#133526) 2023-08-29 [email protected] Roll Flutter Engine from 1e821961e96a to ffda7e3cfc7f (2 revisions) (flutter/flutter#133523) 2023-08-29 [email protected] Roll Flutter Engine from 45e2b41e5ae5 to 1e821961e96a (2 revisions) (flutter/flutter#133520) 2023-08-29 [email protected] Roll Flutter Engine from bd2132a0814f to 45e2b41e5ae5 (2 revisions) (flutter/flutter#133518) 2023-08-29 [email protected] add missing forwards of local-engine-host in benchmark runners (flutter/flutter#133517) 2023-08-28 [email protected] Roll Flutter Engine from a7a4c1c70bad to bd2132a0814f (3 revisions) (flutter/flutter#133516) 2023-08-28 [email protected] FocusNode and FocusManager should dispatch creation in constructor. (flutter/flutter#133490) 2023-08-28 [email protected] Use flutter pub get instead of dart pub get in create_api_docs.dart (flutter/flutter#133493) 2023-08-28 [email protected] PlatformRouteInformationProvider should dispatch creation in constructor. (flutter/flutter#133492) 2023-08-28 [email protected] Roll Flutter Engine from 91522a188bda to a7a4c1c70bad (11 revisions) (flutter/flutter#133508) 2023-08-28 [email protected] Revert "Remove `ImageProvider.load`, `DecoderCallback` and `PaintingB� (flutter/flutter#133482) 2023-08-28 [email protected] Fix context menu button color on Android when textButtonTheme is set (flutter/flutter#133271) 2023-08-28 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.21.4 to 2.21.5 (flutter/flutter#133504) 2023-08-28 [email protected] Fix `DatePickerDialog` & `DateRangePickerDialog` overflow when resized from landscape to portrait (flutter/flutter#133327) 2023-08-28 [email protected] Empty commit to re-trigger tests (flutter/flutter#133495) 2023-08-28 [email protected] Revert "PlatformRouteInformationProvider should dispatch creation in constructor." (flutter/flutter#133479) 2023-08-28 [email protected] Revert "FocusNode and FocusManager should dispatch creation in constructor." (flutter/flutter#133474) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Fixes #133027
When setting a
textButtonThemeit should not override the native context menu colors.Pre-launch Checklist
///).