Skip to content

Commit

Permalink
Decrease YaruTitleBar height
Browse files Browse the repository at this point in the history
Fixes #356
  • Loading branch information
Jupi007 committed Nov 2, 2022
1 parent e686fc6 commit b185193
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
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),
);
}
}

0 comments on commit b185193

Please sign in to comment.