Skip to content
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

YaruTitleBarThemeData: fix buttonPadding type #544

Merged
merged 2 commits into from
Jan 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions lib/src/controls/yaru_title_bar_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class YaruTitleBarThemeData extends ThemeExtension<YaruTitleBarThemeData>
final bool? centerTitle;
final double? titleSpacing;
final double? buttonSpacing;
final EdgeInsets? buttonPadding;
final EdgeInsetsGeometry? buttonPadding;
final MaterialStateProperty<Color?>? foregroundColor;
final MaterialStateProperty<Color?>? backgroundColor;
final TextStyle? titleTextStyle;
Expand All @@ -50,7 +50,7 @@ class YaruTitleBarThemeData extends ThemeExtension<YaruTitleBarThemeData>
bool? centerTitle,
double? titleSpacing,
double? buttonSpacing,
EdgeInsets? buttonPadding,
EdgeInsetsGeometry? buttonPadding,
MaterialStateProperty<Color?>? foregroundColor,
MaterialStateProperty<Color?>? backgroundColor,
TextStyle? titleTextStyle,
Expand Down Expand Up @@ -84,7 +84,8 @@ class YaruTitleBarThemeData extends ThemeExtension<YaruTitleBarThemeData>
centerTitle: t < 0.5 ? centerTitle : o?.centerTitle,
titleSpacing: lerpDouble(titleSpacing, o?.titleSpacing, t),
buttonSpacing: lerpDouble(buttonSpacing, o?.buttonSpacing, t),
buttonPadding: EdgeInsets.lerp(buttonPadding, o?.buttonPadding, t),
buttonPadding:
EdgeInsetsGeometry.lerp(buttonPadding, o?.buttonPadding, t),
foregroundColor: MaterialStateProperty.lerp<Color?>(
foregroundColor,
o?.foregroundColor,
Expand Down