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

Add YaruBackButtonTheme & YaruBackButtonStyle (rounded vs. square) #531

Merged
merged 4 commits into from Jan 19, 2023
Merged

Add YaruBackButtonTheme & YaruBackButtonStyle (rounded vs. square) #531

merged 4 commits into from Jan 19, 2023

Conversation

jpnurmi
Copy link
Member

@jpnurmi jpnurmi commented Jan 15, 2023

Square Rounded
Screenshot from 2023-01-15 23-12-35 Screenshot from 2023-01-15 23-12-22

@jpnurmi jpnurmi changed the title Add YaruBackButtonStyle (rounded vs. square) Add YaruBackButtonTheme & YaruBackButtonStyle (rounded vs. square) Jan 15, 2023
@Feichtmeier
Copy link
Member

That's nice! It's just a little bit too big IMO

@Feichtmeier
Copy link
Member

Feichtmeier commented Jan 16, 2023

....styleFrom(fixedSize: const Size(40, 40), ...),

should fit better IMO

@Feichtmeier
Copy link
Member

YaruBackButton uses a YaruIconButton that already has a fixed 40x40 size.

https://github.com/ubuntu/yaru_widgets.dart/blob/8010f16248fbb1e4ee0479da7994b67e4d92ad65/lib/src/controls/yaru_icon_button.dart#L12

https://github.com/ubuntu/yaru_widgets.dart/blob/8010f16248fbb1e4ee0479da7994b67e4d92ad65/lib/src/controls/yaru_icon_button.dart#L45

Woops, right, but I think "Center" is what really forces it to not expand anymore. Could we put this here aswell or is this weird?

@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 19, 2023

Center forces it a bit smaller but depending on the context, I think it's still too large...

image

@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 19, 2023

Using YaruIconButton directly to be able to customize:

YaruIconButton(
  iconSize: 32,
  padding: EdgeInsets.zero,
  onPressed: Wizard.of(context).back,
  icon: const Icon(YaruIcons.go_previous),
)

image

@Feichtmeier
Copy link
Member

Feichtmeier commented Jan 19, 2023

IMO that's a good size 👍
but let's ask the others @Jupi007 @madsrh

@Jupi007
Copy link
Member

Jupi007 commented Jan 19, 2023

LGFM 👍

@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 19, 2023

Here they are, side by side for comparison :)

Screencast.from.2023-01-19.14-43-34.webm

@Feichtmeier Feichtmeier merged commit d81fc72 into ubuntu:main Jan 19, 2023
@jpnurmi jpnurmi mentioned this pull request Jan 20, 2023
@jpnurmi jpnurmi deleted the back-button-style branch February 5, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants