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

Decrease YaruTitleBar height #357

Merged
merged 1 commit into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const kYaruPagePadding = 20.0;

/// The default height of [YaruTitleBar].
const kYaruTitleBarHeight = 72.0;
const kYaruTitleBarHeight = 50.0;

/// The default border radius for Yaru-style containers.
const kYaruContainerRadius = 8.0;
Expand Down
14 changes: 9 additions & 5 deletions lib/src/controls/yaru_close_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import 'package:yaru_icons/yaru_icons.dart';

import 'yaru_icon_button.dart';

const _kCloseButtonSize = 32.0;

class YaruCloseButton extends StatelessWidget {
const YaruCloseButton({
super.key,
Expand All @@ -15,12 +17,14 @@ class YaruCloseButton extends StatelessWidget {

@override
Widget build(BuildContext context) {
return YaruIconButton(
style: IconButton.styleFrom(
fixedSize: const Size.square(34),
return Align(
alignment: Alignment.center,
child: YaruIconButton(
padding: EdgeInsets.zero,
onPressed: enabled ? onPressed ?? Navigator.of(context).maybePop : null,
icon: const Icon(YaruIcons.window_close),
iconSize: _kCloseButtonSize,
),
onPressed: enabled ? onPressed ?? Navigator.of(context).maybePop : null,
icon: const Icon(YaruIcons.window_close),
);
}
}