Skip to content

Commit

Permalink
fix: Square Windows title controls (#967)
Browse files Browse the repository at this point in the history
* Square Windows title controls

* Update windows title bar tests
  • Loading branch information
ashuntu authored Dec 3, 2024
1 parent ca0e8ee commit e81046e
Show file tree
Hide file tree
Showing 48 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/src/widgets/yaru_window_control.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import 'package:yaru/theme.dart';
const kYaruWindowControlSize = 24.0;

/// The size of a [YaruWindowControl] on the [YaruWindowControlPlatform.windows] platform.
const kYaruWindowsWindowControlSize = Size(44, 28);
const kYaruWindowsWindowControlSize = 46.0;

const _kWindowControlIconStrokeWidth = 1.0;
const _kWindowControlIconStrokeAlign = _kWindowControlIconStrokeWidth / 2;
Expand Down Expand Up @@ -322,8 +322,8 @@ class _YaruWindowControlState extends State<YaruWindowControl>
)
: null,
),
child: SizedBox.fromSize(
size: kYaruWindowsWindowControlSize,
child: SizedBox.square(
dimension: kYaruWindowsWindowControlSize,
child: child,
),
);
Expand Down
Binary file modified test/widgets/goldens/yaru_title_bar-windows-closable-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-closable-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-dialog-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-dialog-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-dialog-red-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-dialog-red-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-empty-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-empty-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-inactive-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-inactive-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-maximizable-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-restorable-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_title_bar-windows-restorable-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_window_control-windows-close-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_window_control-windows-close-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_window_control-windows-maximize-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/widgets/goldens/yaru_window_control-windows-minimize-dark.png
Binary file modified test/widgets/goldens/yaru_window_control-windows-restore-dark.png
Binary file modified test/widgets/goldens/yaru_window_control-windows-restore-light.png
2 changes: 1 addition & 1 deletion test/widgets/yaru_window_control_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void main() {

if (variant.label.startsWith('windows')) {
platform = YaruWindowControlPlatform.windows;
size = kYaruWindowsWindowControlSize;
size = const Size.square(kYaruWindowsWindowControlSize);
} else {
platform = YaruWindowControlPlatform.yaru;
size = const Size.square(kYaruWindowControlSize);
Expand Down

0 comments on commit e81046e

Please sign in to comment.