Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add always-visible scrollbar and SafeArea to collage pages

Prateek Sunal3a5ee6ae27dd
diff --git a/mobile/apps/photos/lib/ui/tools/collage/collage_with_five_items.dart b/mobile/apps/photos/lib/ui/tools/collage/collage_with_five_items.dart
index faf5166bde..1b3007b992 100644
--- a/mobile/apps/photos/lib/ui/tools/collage/collage_with_five_items.dart
+++ b/mobile/apps/photos/lib/ui/tools/collage/collage_with_five_items.dart
@@ -43,30 +43,36 @@ class _CollageWithFiveItemsState extends State<CollageWithFiveItems> {
@override
Widget build(BuildContext context) {
- return LayoutBuilder(
- builder: (context, constraints) {
- return SingleChildScrollView(
- child: ConstrainedBox(
- constraints: BoxConstraints(minHeight: constraints.maxHeight),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- WidgetsToImage(
- controller: _widgetsToImageController,
- child: _getCollage(),
- ),
- Column(
+ return SafeArea(
+ top: false,
+ child: LayoutBuilder(
+ builder: (context, constraints) {
+ return Scrollbar(
+ thumbVisibility: true,
+ child: SingleChildScrollView(
+ child: ConstrainedBox(
+ constraints: BoxConstraints(minHeight: constraints.maxHeight),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- const CollageLayoutHeading(),
- _getLayouts(),
- const Padding(padding: EdgeInsets.all(4)),
+ WidgetsToImage(
+ controller: _widgetsToImageController,
+ child: _getCollage(),
+ ),
+ Column(
+ children: [
+ const CollageLayoutHeading(),
+ _getLayouts(),
+ const Padding(padding: EdgeInsets.all(4)),
+ ],
+ ),
],
),
- ],
+ ),
),
- ),
- );
- },
+ );
+ },
+ ),
);
}
diff --git a/mobile/apps/photos/lib/ui/tools/collage/collage_with_four_items.dart b/mobile/apps/photos/lib/ui/tools/collage/collage_with_four_items.dart
index 7f5bd01326..7b3543f144 100644
--- a/mobile/apps/photos/lib/ui/tools/collage/collage_with_four_items.dart
+++ b/mobile/apps/photos/lib/ui/tools/collage/collage_with_four_items.dart
@@ -42,30 +42,36 @@ class _CollageWithFourItemsState extends State<CollageWithFourItems> {
@override
Widget build(BuildContext context) {
- return LayoutBuilder(
- builder: (context, constraints) {
- return SingleChildScrollView(
- child: ConstrainedBox(
- constraints: BoxConstraints(minHeight: constraints.maxHeight),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- WidgetsToImage(
- controller: _widgetsToImageController,
- child: _getCollage(),
- ),
- Column(
+ return SafeArea(
+ top: false,
+ child: LayoutBuilder(
+ builder: (context, constraints) {
+ return Scrollbar(
+ thumbVisibility: true,
+ child: SingleChildScrollView(
+ child: ConstrainedBox(
+ constraints: BoxConstraints(minHeight: constraints.maxHeight),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- const CollageLayoutHeading(),
- _getLayouts(),
- const Padding(padding: EdgeInsets.all(4)),
+ WidgetsToImage(
+ controller: _widgetsToImageController,
+ child: _getCollage(),
+ ),
+ Column(
+ children: [
+ const CollageLayoutHeading(),
+ _getLayouts(),
+ const Padding(padding: EdgeInsets.all(4)),
+ ],
+ ),
],
),
- ],
+ ),
),
- ),
- );
- },
+ );
+ },
+ ),
);
}
diff --git a/mobile/apps/photos/lib/ui/tools/collage/collage_with_six_items.dart b/mobile/apps/photos/lib/ui/tools/collage/collage_with_six_items.dart
index 51fe2d7667..1d7fa596fe 100644
--- a/mobile/apps/photos/lib/ui/tools/collage/collage_with_six_items.dart
+++ b/mobile/apps/photos/lib/ui/tools/collage/collage_with_six_items.dart
@@ -44,30 +44,36 @@ class _CollageWithSixItemsState extends State<CollageWithSixItems> {
@override
Widget build(BuildContext context) {
- return LayoutBuilder(
- builder: (context, constraints) {
- return SingleChildScrollView(
- child: ConstrainedBox(
- constraints: BoxConstraints(minHeight: constraints.maxHeight),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- WidgetsToImage(
- controller: _widgetsToImageController,
- child: _getCollage(),
- ),
- Column(
+ return SafeArea(
+ top: false,
+ child: LayoutBuilder(
+ builder: (context, constraints) {
+ return Scrollbar(
+ thumbVisibility: true,
+ child: SingleChildScrollView(
+ child: ConstrainedBox(
+ constraints: BoxConstraints(minHeight: constraints.maxHeight),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- const CollageLayoutHeading(),
- _getLayouts(),
- const Padding(padding: EdgeInsets.all(4)),
+ WidgetsToImage(
+ controller: _widgetsToImageController,
+ child: _getCollage(),
+ ),
+ Column(
+ children: [
+ const CollageLayoutHeading(),
+ _getLayouts(),
+ const Padding(padding: EdgeInsets.all(4)),
+ ],
+ ),
],
),
- ],
+ ),
),
- ),
- );
- },
+ );
+ },
+ ),
);
}
diff --git a/mobile/apps/photos/lib/ui/tools/collage/collage_with_three_items.dart b/mobile/apps/photos/lib/ui/tools/collage/collage_with_three_items.dart
index 586261ad6c..6fef38918f 100644
--- a/mobile/apps/photos/lib/ui/tools/collage/collage_with_three_items.dart
+++ b/mobile/apps/photos/lib/ui/tools/collage/collage_with_three_items.dart
@@ -42,30 +42,36 @@ class _CollageWithThreeItemsState extends State<CollageWithThreeItems> {
@override
Widget build(BuildContext context) {
- return LayoutBuilder(
- builder: (context, constraints) {
- return SingleChildScrollView(
- child: ConstrainedBox(
- constraints: BoxConstraints(minHeight: constraints.maxHeight),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- WidgetsToImage(
- controller: _widgetsToImageController,
- child: _getCollage(),
- ),
- Column(
+ return SafeArea(
+ top: false,
+ child: LayoutBuilder(
+ builder: (context, constraints) {
+ return Scrollbar(
+ thumbVisibility: true,
+ child: SingleChildScrollView(
+ child: ConstrainedBox(
+ constraints: BoxConstraints(minHeight: constraints.maxHeight),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- const CollageLayoutHeading(),
- _getLayouts(),
- const Padding(padding: EdgeInsets.all(4)),
+ WidgetsToImage(
+ controller: _widgetsToImageController,
+ child: _getCollage(),
+ ),
+ Column(
+ children: [
+ const CollageLayoutHeading(),
+ _getLayouts(),
+ const Padding(padding: EdgeInsets.all(4)),
+ ],
+ ),
],
),
- ],
+ ),
),
- ),
- );
- },
+ );
+ },
+ ),
);
}
diff --git a/mobile/apps/photos/lib/ui/tools/collage/collage_with_two_items.dart b/mobile/apps/photos/lib/ui/tools/collage/collage_with_two_items.dart
index f08989c807..bfd3538761 100644
--- a/mobile/apps/photos/lib/ui/tools/collage/collage_with_two_items.dart
+++ b/mobile/apps/photos/lib/ui/tools/collage/collage_with_two_items.dart
@@ -40,30 +40,36 @@ class _CollageWithTwoItemsState extends State<CollageWithTwoItems> {
@override
Widget build(BuildContext context) {
- return LayoutBuilder(
- builder: (context, constraints) {
- return SingleChildScrollView(
- child: ConstrainedBox(
- constraints: BoxConstraints(minHeight: constraints.maxHeight),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- WidgetsToImage(
- controller: _widgetsToImageController,
- child: _getCollage(),
- ),
- Column(
+ return SafeArea(
+ top: false,
+ child: LayoutBuilder(
+ builder: (context, constraints) {
+ return Scrollbar(
+ thumbVisibility: true,
+ child: SingleChildScrollView(
+ child: ConstrainedBox(
+ constraints: BoxConstraints(minHeight: constraints.maxHeight),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- const CollageLayoutHeading(),
- _getLayouts(),
- const Padding(padding: EdgeInsets.all(4)),
+ WidgetsToImage(
+ controller: _widgetsToImageController,
+ child: _getCollage(),
+ ),
+ Column(
+ children: [
+ const CollageLayoutHeading(),
+ _getLayouts(),
+ const Padding(padding: EdgeInsets.all(4)),
+ ],
+ ),
],
),
- ],
+ ),
),
- ),
- );
- },
+ );
+ },
+ ),
);
}