Skip to content

Commit

Permalink
fix: Move up + make search and sort row smaller
Browse files Browse the repository at this point in the history
  • Loading branch information
spydon committed Oct 3, 2024
1 parent b6d6513 commit 774c95c
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions packages/app_center/lib/manage/manage_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,18 @@ class ManagePage extends ConsumerWidget {
SliverList.list(
children: [
const SizedBox(height: kSectionSpacing),
Text(
l10n.managePageInstalledAndUpdatedLabel,
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(fontWeight: FontWeight.w500),
),
const SizedBox(height: 8),
Row(
children: [
Expanded(
Text(
l10n.managePageInstalledAndUpdatedLabel,
style: Theme.of(context)
.textTheme
.titleMedium!
.copyWith(fontWeight: FontWeight.w500),
),
const Spacer(),
ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 300),
// TODO: refactor - extract common text field decoration from
// here and the `SearchField` widget
child: TextFormField(
Expand All @@ -193,36 +194,35 @@ class ManagePage extends ConsumerWidget {
.state = value,
),
),
const SizedBox(width: 16),
const SizedBox(width: kSpacing),
Text(l10n.searchPageSortByLabel),
const SizedBox(width: 8),
const SizedBox(width: kSpacingSmall),
// TODO: refactor - create proper widget
Expanded(
child: Consumer(
builder: (context, ref, child) {
final sortOrder = ref.watch(localSnapSortOrderProvider);
return MenuButtonBuilder<SnapSortOrder>(
values: const [
SnapSortOrder.alphabeticalAsc,
SnapSortOrder.alphabeticalDesc,
SnapSortOrder.installedDateAsc,
SnapSortOrder.installedDateDesc,
SnapSortOrder.installedSizeAsc,
SnapSortOrder.installedSizeDesc,
],
itemBuilder: (context, sortOrder, child) =>
Text(sortOrder.localize(l10n)),
onSelected: (value) => ref
.read(localSnapSortOrderProvider.notifier)
.state = value,
child: Text(sortOrder.localize(l10n)),
);
},
),
Consumer(
builder: (context, ref, child) {
final sortOrder = ref.watch(localSnapSortOrderProvider);
return MenuButtonBuilder<SnapSortOrder>(
values: const [
SnapSortOrder.alphabeticalAsc,
SnapSortOrder.alphabeticalDesc,
SnapSortOrder.installedDateAsc,
SnapSortOrder.installedDateDesc,
SnapSortOrder.installedSizeAsc,
SnapSortOrder.installedSizeDesc,
],
itemBuilder: (context, sortOrder, child) =>
Text(sortOrder.localize(l10n)),
onSelected: (value) => ref
.read(localSnapSortOrderProvider.notifier)
.state = value,
expanded: false,
child: Text(sortOrder.localize(l10n)),
);
},
),
const SizedBox(width: 16),
const SizedBox(width: kSpacing),
Text(l10n.managePageShowSystemSnapsLabel),
const SizedBox(width: 8),
const SizedBox(width: kSpacingSmall),
YaruCheckbox(
value: ref.watch(showLocalSystemAppsProvider),
onChanged: (value) => ref
Expand Down

0 comments on commit 774c95c

Please sign in to comment.