Skip to content

Commit

Permalink
Merge pull request #1621 from ubuntu/gtk4_paned_look
Browse files Browse the repository at this point in the history
feat: use a paned look
  • Loading branch information
spydon authored Jul 1, 2024
2 parents 6013b51 + 7279488 commit 853ce0f
Showing 2 changed files with 37 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/app_center/lib/search/search_field.dart
Original file line number Diff line number Diff line change
@@ -179,7 +179,6 @@ class _SearchFieldState extends ConsumerState<SearchField> {
: widget.onSearch(query),
decoration: InputDecoration(
contentPadding: const EdgeInsets.fromLTRB(12, 8, 12, 8),
fillColor: Theme.of(context).dividerColor,
prefixIcon: const Icon(YaruIcons.search, size: 16),
prefixIconConstraints: iconConstraints,
hintText: l10n.searchFieldSearchHint,
38 changes: 37 additions & 1 deletion packages/app_center/lib/store/store_app.dart
Original file line number Diff line number Diff line change
@@ -101,7 +101,7 @@ class _StoreAppHome extends ConsumerWidget {
});

return Scaffold(
appBar: YaruWindowTitleBar(
appBar: _TitleBar(
title: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: kSearchBarWidth),
child: SearchField(
@@ -160,3 +160,39 @@ class _StoreAppHome extends ConsumerWidget {
);
}
}

class _TitleBar extends StatelessWidget implements PreferredSizeWidget {
const _TitleBar({required this.title});

final Widget title;

@override
Widget build(BuildContext context) {
return Row(
children: [
SizedBox(
width: kPaneWidth,
child: YaruWindowTitleBar(
style: YaruTitleBarStyle.undecorated,
border: BorderSide.none,
backgroundColor: YaruMasterDetailTheme.of(context).sideBarColor,
),
),
const SizedBox(
height: kYaruTitleBarHeight,
child: VerticalDivider(),
),
Expanded(
child: YaruWindowTitleBar(
border: BorderSide.none,
backgroundColor: Colors.transparent,
title: title,
),
),
],
);
}

@override
Size get preferredSize => const Size(0, kYaruTitleBarHeight);
}

0 comments on commit 853ce0f

Please sign in to comment.