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

Example: make better use of YaruWindowTitleBar #521

Merged
merged 3 commits into from Jan 14, 2023
Merged

Example: make better use of YaruWindowTitleBar #521

merged 3 commits into from Jan 14, 2023

Conversation

jpnurmi
Copy link
Member

@jpnurmi jpnurmi commented Jan 14, 2023

image
image
image
image

Supercedes #513

@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 14, 2023

There's one special page that doesn't play nicely:

image
image

@Feichtmeier
Copy link
Member

@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 14, 2023

Damn, the idea of using a divided title bar with master-detail and shared one navi-rail doesn't work then. 🤔

@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 14, 2023

What if we make the nested pages use YaruWindowTitleBar and filter out the whole page item from navi-rail?

MD NR
image image

@Feichtmeier
Copy link
Member

Damn, the idea of using a divided title bar with master-detail and shared one navi-rail doesn't work then. thinking

Well we had a version of the layouts which needed those titlebuilders for the appbar in the scaffolds. Pro was that we did not use so many scaffolds then. But if we would do this again we would need one more builder for the appbar title because we are using the titlebuilders for the master tiles and navi items now

@Feichtmeier
Copy link
Member

What if we make the nested pages use YaruWindowTitleBar and filter out the whole page item from navi-rail?

I didn't understand this 🤔 could you elaborate ?

@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 14, 2023

Proposal:

  PageItem(
    title: 'YaruNavigationPage',
    iconBuilder: (context, selected) => selected
        ? const Icon(YaruIcons.compass_filled)
        : const Icon(YaruIcons.compass),
    pageBuilder: (_) => const NavigationPage(),
    supportedLayouts: {YaruMasterDetailPage}, // <=== added (defaults to {YaruMasterDetailPage,YaruNavigationPage})
  ),

@Feichtmeier
Copy link
Member

Proposal:

  PageItem(
    title: 'YaruNavigationPage',
    iconBuilder: (context, selected) => selected
        ? const Icon(YaruIcons.compass_filled)
        : const Icon(YaruIcons.compass),
    pageBuilder: (_) => const NavigationPage(),
    supportedLayouts: {YaruMasterDetailPage}, // <=== added (defaults to {YaruMasterDetailPage,YaruNavigationPage})
  ),

ahhhh! :)

Yeah maybe this is a good idea. Eventually we could add more layouts in the future with fixed appbars which require title widgets plus nullable leading widgets

@Feichtmeier Feichtmeier merged commit 9a00484 into ubuntu:main Jan 14, 2023
@jpnurmi jpnurmi deleted the example branch January 14, 2023 19:36
@jpnurmi
Copy link
Member Author

jpnurmi commented Jan 14, 2023

Eventually we could add more layouts in the future with fixed appbars which require title widgets plus nullable leading widgets

Yaru wizard would be cool. :) I've learned with the installer that wizards can have awfully complicated conditional navigation rules, though.

@jpnurmi jpnurmi mentioned this pull request Jan 15, 2023
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

2 participants