Skip to content

Commit 5be231d

Browse files
tommyxchowclaude
andcommitted
fix landscape safe area padding across settings and list screens
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1dab572 commit 5be231d

File tree

6 files changed

+28
-22
lines changed

6 files changed

+28
-22
lines changed

lib/screens/home/stream_list/offline_channel_card.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@ class OfflineChannelCard extends StatelessWidget {
8181
);
8282
},
8383
child: Padding(
84-
padding: EdgeInsets.symmetric(
85-
horizontal: 16 + MediaQuery.of(context).padding.left,
86-
vertical: 8,
84+
padding: EdgeInsets.fromLTRB(
85+
16 + MediaQuery.of(context).padding.left,
86+
8,
87+
16 + MediaQuery.of(context).padding.right,
88+
8,
8789
),
8890
child: Row(
8991
spacing: 12,

lib/screens/settings/settings.dart

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,14 @@ class Settings extends StatelessWidget {
7777
body: Stack(
7878
children: [
7979
// Main scrollable content
80-
FrostyScrollbar(
81-
padding: EdgeInsets.only(
82-
top: MediaQuery.of(context).padding.top + kToolbarHeight,
83-
),
84-
child: CustomScrollView(
80+
SafeArea(
81+
top: false,
82+
bottom: false,
83+
child: FrostyScrollbar(
84+
padding: EdgeInsets.only(
85+
top: MediaQuery.of(context).padding.top + kToolbarHeight,
86+
),
87+
child: CustomScrollView(
8588
slivers: [
8689
SliverPadding(
8790
padding: EdgeInsets.only(
@@ -201,6 +204,7 @@ class Settings extends StatelessWidget {
201204
],
202205
),
203206
),
207+
),
204208
// Blurred app bar overlay
205209
Positioned(
206210
top: 0,

lib/screens/settings/widgets/release_notes.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ class _ReleaseNotesState extends State<ReleaseNotes> {
7474
),
7575
child: Markdown(
7676
padding: EdgeInsets.fromLTRB(
77-
16,
77+
16 + MediaQuery.of(context).padding.left,
7878
MediaQuery.of(context).padding.top + kToolbarHeight,
79-
16,
79+
16 + MediaQuery.of(context).padding.right,
8080
16,
8181
),
8282
controller: _scrollController,

lib/screens/settings/widgets/settings_tile_route.dart

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,14 @@ class _BlurredSettingsPage extends StatelessWidget {
7070
children: [
7171
// Main scrollable content
7272
Positioned.fill(
73-
child: MediaQuery.removePadding(
74-
context: context,
75-
removeTop: true,
76-
child: child,
73+
child: SafeArea(
74+
top: false,
75+
bottom: false,
76+
child: MediaQuery.removePadding(
77+
context: context,
78+
removeTop: true,
79+
child: child,
80+
),
7781
),
7882
),
7983
// Blurred app bar overlay - positioned AFTER content so it renders on top

lib/widgets/expandable_section_header.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ class ExpandableSectionHeader extends StatelessWidget {
2222

2323
@override
2424
Widget build(BuildContext context) {
25-
final isLandscape = context.isLandscape;
26-
2725
return InkWell(
2826
onTap: onToggle != null
2927
? () {
@@ -35,9 +33,9 @@ class ExpandableSectionHeader extends StatelessWidget {
3533
padding:
3634
padding ??
3735
EdgeInsets.fromLTRB(
38-
isLandscape ? MediaQuery.of(context).padding.left : 16,
36+
16 + MediaQuery.of(context).padding.left,
3937
0,
40-
isLandscape ? MediaQuery.of(context).padding.right : 16,
38+
16 + MediaQuery.of(context).padding.right,
4139
8,
4240
),
4341
child: Column(

lib/widgets/section_header.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ class SectionHeader extends StatelessWidget {
1919

2020
@override
2121
Widget build(BuildContext context) {
22-
final isLandscape = context.isLandscape;
23-
2422
return Padding(
2523
padding:
2624
padding ??
2725
EdgeInsets.fromLTRB(
28-
isLandscape ? MediaQuery.of(context).padding.left : 16,
26+
16 + MediaQuery.of(context).padding.left,
2927
0,
30-
isLandscape ? MediaQuery.of(context).padding.right : 16,
28+
16 + MediaQuery.of(context).padding.right,
3129
8,
3230
),
3331
child: Column(

0 commit comments

Comments
 (0)