-
Notifications
You must be signed in to change notification settings - Fork 6
fix(UX-1563): High Contrast Issue #424
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -191,6 +191,13 @@ class ZetaButton extends ZetaStatelessWidget { | |
| Widget build(BuildContext context) { | ||
| final minConstraints = _minConstraints(context); | ||
| final iconSize = _iconSize(context); | ||
| final zeta = Zeta.of(context); | ||
|
|
||
| // Override to sharp if in AAA contrast mode | ||
| final contrastBorderType = zeta.contrast == ZetaContrast.aaa | ||
| ? ZetaWidgetBorder.sharp | ||
| : borderType ?? (context.rounded ? ZetaWidgetBorder.rounded : ZetaWidgetBorder.sharp); | ||
|
Comment on lines
+197
to
+199
|
||
|
|
||
| return Semantics( | ||
| button: true, | ||
| enabled: onPressed != null, | ||
|
|
@@ -203,7 +210,7 @@ class ZetaButton extends ZetaStatelessWidget { | |
| onPressed: onPressed, | ||
| style: buttonStyle( | ||
| context, | ||
| borderType ?? (context.rounded ? ZetaWidgetBorder.rounded : ZetaWidgetBorder.sharp), | ||
| contrastBorderType, | ||
| type, | ||
| ), | ||
| child: SelectionContainer.disabled( | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.