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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(YaruMasterDetailPage): bring back sidebar color option #826

Merged
merged 5 commits into from Jan 16, 2024

Conversation

Feichtmeier
Copy link
Member

@Feichtmeier Feichtmeier commented Jan 9, 2024

I am not entirely sure what removed the sidebar color, but I think it was the undershot 馃

However, it is back (if changed in the theme)
The default remains as in master.

Result of

  @override
  Widget build(BuildContext context) {
    return YaruMasterDetailTheme(
      data: YaruMasterDetailTheme.of(context)
          .copyWith(sideBarColor: Colors.pink.withOpacity(0.2)),
      child: YaruMasterDetailPage(
        initialIndex: 1,
        layoutDelegate: const YaruMasterResizablePaneDelegate(
          initialPaneWidth: 280,
          minPageWidth: kYaruMasterDetailBreakpoint / 2,
          minPaneWidth: 175,
        ),
        length: pageItems.length,
        tileBuilder: (context, index, selected, availableWidth) =>
            YaruMasterTile(
          leading: pageItems[index].iconBuilder(context, selected),
          title: buildTitle(context, pageItems[index]),
        ),
        pageBuilder: (context, index) => YaruDetailPage(
          appBar: YaruWindowTitleBar(
            backgroundColor: Colors.transparent,
            border: BorderSide.none,
            leading:
                Navigator.of(context).canPop() ? const YaruBackButton() : null,
            title: buildTitle(context, pageItems[index]),
          ),
          body: pageItems[index].pageBuilder(context),
          floatingActionButton: CodeSnippedButton(
            pageItem: pageItems[index],
          ),
        ),
        appBar: const YaruWindowTitleBar(
          title: Text('Yaru Widgets'),
          backgroundColor: Colors.transparent,
          border: BorderSide.none,
        ),
        bottomBar: Padding(
          padding: const EdgeInsets.symmetric(vertical: 8.0),
          child: YaruMasterTile(
            leading: const Icon(YaruIcons.gear),
            title: const Text('Settings'),
            onTap: () => showSettingsDialog(context),
          ),
        ),
      ),
    );
  }

grafik

@Feichtmeier Feichtmeier enabled auto-merge (squash) January 9, 2024 10:25
@Feichtmeier Feichtmeier marked this pull request as draft January 9, 2024 10:43
auto-merge was automatically disabled January 9, 2024 10:43

Pull request was converted to draft

@Feichtmeier Feichtmeier marked this pull request as ready for review January 9, 2024 10:44
@Feichtmeier Feichtmeier marked this pull request as draft January 9, 2024 10:47
Copy link
Member

@Jupi007 Jupi007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGFM 馃憤

@Feichtmeier Feichtmeier marked this pull request as ready for review January 16, 2024 13:27
@Feichtmeier Feichtmeier merged commit f03ec37 into main Jan 16, 2024
7 checks passed
@Feichtmeier Feichtmeier deleted the fix_sidebar_color branch January 16, 2024 13:28
@github-actions github-actions bot mentioned this pull request Jan 16, 2024
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