Skip to content

Commit

Permalink
fix: macos back button in toolbar, text field label spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Nov 12, 2022
1 parent d01042e commit af9485b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
11 changes: 8 additions & 3 deletions lib/src/platform_back_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,14 @@ class PlatformBackButton extends StatelessWidget with PlatformMixin<Widget> {

@override
Widget macos(BuildContext context) {
return MacosBackButton(
fillColor: color,
onPressed: onPressed,
return Container(
height: 30,
width: 30,
margin: const EdgeInsets.symmetric(vertical: 10),
child: MacosBackButton(
fillColor: color,
onPressed: onPressed,
),
);
}

Expand Down
2 changes: 2 additions & 0 deletions lib/src/platform_text_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ class _PlatformTextFieldState extends FluentUI.State<PlatformTextField>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (widget.label != null) Text(widget.label!, style: widget.labelStyle),
SizedBox(height: widget.label != null ? 8.0 : 0.0),
textField,
],
);
Expand Down Expand Up @@ -513,6 +514,7 @@ class _PlatformTextFieldState extends FluentUI.State<PlatformTextField>
?.copyWith(fontWeight: FontWeight.w500),
),
),
SizedBox(height: widget.label != null ? 8.0 : 0.0),
textField,
],
);
Expand Down
5 changes: 3 additions & 2 deletions lib/src/platform_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class PlatformThemeData {
linux: androidTheme.textTheme.headline3,
ios: iosTheme.textTheme.navLargeTitleTextStyle,
macos: macosTheme.typography.largeTitle,
windows: windowsTheme?.typography.titleLarge,
windows: windowsTheme?.typography.title,
).resolve(currentPlatform),
caption: PlatformProperty(
android: androidTheme.textTheme.caption,
Expand All @@ -147,7 +147,8 @@ class PlatformThemeData {
linux: androidTheme.textTheme.headline4,
ios: iosTheme.textTheme.navTitleTextStyle,
macos: macosTheme.typography.title1,
windows: windowsTheme?.typography.title,
windows: windowsTheme?.typography.bodyLarge
?.copyWith(fontWeight: FontWeight.bold),
).resolve(currentPlatform),
),
borderColor: PlatformProperty(
Expand Down
3 changes: 2 additions & 1 deletion lib/src/platform_window_buttons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class _PlatformWindowButtonsState extends State<PlatformWindowButtons>
buttonType: WindowButtonType.close,
onPressed: widget.onClose ?? config?.onClose,
),
const SizedBox(width: 4),
],
);
}
Expand Down Expand Up @@ -257,7 +258,7 @@ class _PlatformWindowButtonsState extends State<PlatformWindowButtons>
: widget.onMaximize ?? config?.onMaximize,
child: isMaximized(context)
? RestoreIcon(color: PlatformTextTheme.of(context).body!.color!)
: CloseIcon(color: PlatformTextTheme.of(context).body!.color!),
: MaximizeIcon(color: PlatformTextTheme.of(context).body!.color!),
),
FluentUI.Button(
style: buttonStyle.copyWith(
Expand Down

0 comments on commit af9485b

Please sign in to comment.