Skip to content

Commit

Permalink
fix: settings page scrollbar position
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Nov 27, 2023
1 parent 722dd86 commit ee82290
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
5 changes: 3 additions & 2 deletions lib/pages/search/search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ class SearchPage extends HookConsumerWidget {
),
color: theme.scaffoldBackgroundColor,
child: TextField(
autofocus:
queries.none((s) => s.hasPageData && !s.hasPageError),
autofocus: queries
.none((s) => s.hasPageData && !s.hasPageError) &&
!kIsMobile,
decoration: InputDecoration(
prefixIcon: const Icon(SpotubeIcons.search),
hintText: "${context.l10n.search}...",
Expand Down
15 changes: 8 additions & 7 deletions lib/pages/settings/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ class SettingsPage extends HookConsumerWidget {
title: Text(context.l10n.settings),
centerTitle: true,
),
body: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Flexible(
child: Container(
constraints: const BoxConstraints(maxWidth: 1366),
body: Scrollbar(
controller: controller,
child: Center(
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 1366),
child: ScrollConfiguration(
behavior: const ScrollBehavior().copyWith(scrollbars: false),
child: ListView(
controller: controller,
children: [
Expand All @@ -59,7 +60,7 @@ class SettingsPage extends HookConsumerWidget {
),
),
),
],
),
),
),
);
Expand Down

0 comments on commit ee82290

Please sign in to comment.