-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Automatically scale down Dialog padding for larger text scale factors #58245
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
Conversation
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, can you include some screenshots comparing old behavior to new behavior?
@@ -11,7 +11,7 @@ import 'package:matcher/matcher.dart'; | |||
|
|||
import '../widgets/semantics_tester.dart'; | |||
|
|||
MaterialApp _buildAppWithDialog(Widget dialog, { ThemeData theme }) { | |||
MaterialApp _buildAppWithDialog(Widget dialog, { ThemeData theme, double textScaleFactor = 1.0}) { |
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.
nit: space here to match other {
MaterialApp _buildAppWithDialog(Widget dialog, { ThemeData theme, double textScaleFactor = 1.0}) { | |
MaterialApp _buildAppWithDialog(Widget dialog, { ThemeData theme, double textScaleFactor = 1.0 }) { |
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.
This looks fine; just suggesting a little factoring.
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
Description
The paddings on the outer edges of dialog content (not between content) should be smaller for larger text scale size. This PR computes a factor for scaling down the padding and applies it to the space between the edge of the dialog and the content inside.
before:


after:


Related Issues
Tests
I added the following tests:
25 padding tests
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.