Skip to content

Commit fe3bddd

Browse files
Fix layout for Android 15 edge-to-edge, closes #22
1 parent 5a5d2d9 commit fe3bddd

2 files changed

Lines changed: 38 additions & 36 deletions

File tree

lib/ui/views/reader/reader_view.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ class ReaderView extends StackedView<ReaderViewModel> {
2929
ReaderViewModel viewModel,
3030
Widget? child,
3131
) {
32-
// Color the statusbar
32+
// Color the statusbar based on the active theme.
3333
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
3434
statusBarBrightness: Brightness.dark,
3535
statusBarIconBrightness: Brightness.light,
3636
statusBarColor: context.theme.appColors.appbarBackground,
3737
));
3838
return Scaffold(
3939
key: _scaffoldKey,
40-
backgroundColor: context.theme.appColors.background,
40+
backgroundColor: context.theme.appColors.appbarBackground,
4141
appBar: viewModel.showSecondaryArea
4242
? PreferredSize(
4343
preferredSize: const Size(double.infinity, kToolbarHeight),
@@ -64,7 +64,8 @@ class ReaderView extends StackedView<ReaderViewModel> {
6464
),
6565
),
6666
if (viewModel.primaryAreaBible != 'KJV' || viewModel.secondaryAreaBible != 'KJV')
67-
Padding(
67+
Container(
68+
color: context.theme.appColors.background,
6869
padding: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 12.0),
6970
child: Text(
7071
'This is still a very early look into the unfinished text of the Open English Translation of the Bible. Please double-check the text in advance before using in public.',

lib/ui/views/reader/widgets/primary_reader_appbar/primary_reader_appbar.dart

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,43 +29,44 @@ class PrimaryReaderAppbar extends StackedView<PrimaryReaderAppbarModel> {
2929
PrimaryReaderAppbarModel viewModel,
3030
Widget? child,
3131
) {
32-
return Container(
33-
color: context.theme.appColors.appbarBackground,
34-
height: kToolbarHeight,
35-
child: Row(
36-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
37-
children: [
38-
InkWell(
39-
onTap: onTapSearch,
40-
child: Padding(
41-
padding: const EdgeInsets.all(16.0),
42-
child: PhosphorIcon(
43-
PhosphorIcons.magnifyingGlass(PhosphorIconsStyle.bold),
44-
color: context.theme.appColors.appbarIcon,
45-
size: 20.0,
46-
semanticLabel: 'Search',
32+
return SafeArea(
33+
child: Container(
34+
color: context.theme.appColors.appbarBackground,
35+
child: Row(
36+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
37+
children: [
38+
InkWell(
39+
onTap: onTapSearch,
40+
child: Padding(
41+
padding: const EdgeInsets.all(16.0),
42+
child: PhosphorIcon(
43+
PhosphorIcons.magnifyingGlass(PhosphorIconsStyle.bold),
44+
color: context.theme.appColors.appbarIcon,
45+
size: 20.0,
46+
semanticLabel: 'Search',
47+
),
4748
),
4849
),
49-
),
50-
ReaderSelectorBtn(
51-
readerArea: Area.primary,
52-
isActive: isReaderAreaPopupActive,
53-
onTapBook: onTapBook,
54-
onTapBibleVersion: onTapBibleVersion,
55-
),
56-
InkWell(
57-
onTap: onTapMenu,
58-
child: Padding(
59-
padding: const EdgeInsets.all(16.0),
60-
child: PhosphorIcon(
61-
PhosphorIcons.list(PhosphorIconsStyle.bold),
62-
color: context.theme.appColors.appbarIcon,
63-
size: 20.0,
64-
semanticLabel: 'Menu',
50+
ReaderSelectorBtn(
51+
readerArea: Area.primary,
52+
isActive: isReaderAreaPopupActive,
53+
onTapBook: onTapBook,
54+
onTapBibleVersion: onTapBibleVersion,
55+
),
56+
InkWell(
57+
onTap: onTapMenu,
58+
child: Padding(
59+
padding: const EdgeInsets.all(16.0),
60+
child: PhosphorIcon(
61+
PhosphorIcons.list(PhosphorIconsStyle.bold),
62+
color: context.theme.appColors.appbarIcon,
63+
size: 20.0,
64+
semanticLabel: 'Menu',
65+
),
6566
),
6667
),
67-
),
68-
],
68+
],
69+
),
6970
),
7071
);
7172
}

0 commit comments

Comments
 (0)