style: colors
This commit is contained in:
parent
85841e3349
commit
3b8656a603
11 changed files with 57 additions and 60 deletions
|
@ -95,10 +95,6 @@ class AlbumThumbnailCard extends StatelessWidget {
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: Flex(
|
|
||||||
direction: Axis.vertical,
|
|
||||||
children: [
|
|
||||||
Flexible(
|
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
@ -106,15 +102,14 @@ class AlbumThumbnailCard extends StatelessWidget {
|
||||||
width: cardSize,
|
width: cardSize,
|
||||||
height: cardSize,
|
height: cardSize,
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius:
|
borderRadius: const BorderRadius.all(Radius.circular(20)),
|
||||||
const BorderRadius.all(Radius.circular(20)),
|
|
||||||
child: album.thumbnail.value == null
|
child: album.thumbnail.value == null
|
||||||
? buildEmptyThumbnail()
|
? buildEmptyThumbnail()
|
||||||
: buildAlbumThumbnail(),
|
: buildAlbumThumbnail(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(top: 8.0),
|
padding: const EdgeInsets.only(top: 8.0, left: 8.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: cardSize,
|
width: cardSize,
|
||||||
child: Text(
|
child: Text(
|
||||||
|
@ -126,9 +121,9 @@ class AlbumThumbnailCard extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
buildAlbumTextRow(),
|
Padding(
|
||||||
],
|
padding: const EdgeInsets.only(top: 2.0, left: 8.0),
|
||||||
),
|
child: buildAlbumTextRow(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||||
|
import 'package:immich_mobile/extensions/color_extensions.dart';
|
||||||
import 'package:immich_mobile/modules/album/providers/album.provider.dart';
|
import 'package:immich_mobile/modules/album/providers/album.provider.dart';
|
||||||
import 'package:immich_mobile/modules/album/ui/album_thumbnail_card.dart';
|
import 'package:immich_mobile/modules/album/ui/album_thumbnail_card.dart';
|
||||||
import 'package:immich_mobile/routing/router.dart';
|
import 'package:immich_mobile/routing/router.dart';
|
||||||
|
@ -144,13 +145,14 @@ class LibraryPage extends HookConsumerWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
SizedBox.square(
|
||||||
child: Container(
|
dimension: constraints.maxWidth,
|
||||||
decoration: BoxDecoration(
|
child: Card(
|
||||||
color: context.themeData.cardColor,
|
clipBehavior: Clip.hardEdge,
|
||||||
borderRadius:
|
shape: const RoundedRectangleBorder(
|
||||||
const BorderRadius.all(Radius.circular(20)),
|
borderRadius: BorderRadius.all(Radius.circular(20)),
|
||||||
),
|
),
|
||||||
|
color: context.themeData.cardColor.lighten(5),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.add_rounded,
|
Icons.add_rounded,
|
||||||
|
@ -164,6 +166,7 @@ class LibraryPage extends HookConsumerWidget {
|
||||||
padding: const EdgeInsets.only(
|
padding: const EdgeInsets.only(
|
||||||
top: 8.0,
|
top: 8.0,
|
||||||
bottom: 16,
|
bottom: 16,
|
||||||
|
left: 8.0,
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'library_page_new_album',
|
'library_page_new_album',
|
||||||
|
@ -188,14 +191,7 @@ class LibraryPage extends HookConsumerWidget {
|
||||||
onPressed: onClick,
|
onPressed: onClick,
|
||||||
label: Padding(
|
label: Padding(
|
||||||
padding: const EdgeInsets.only(left: 8.0),
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
child: Text(
|
child: Text(label),
|
||||||
label,
|
|
||||||
style: TextStyle(
|
|
||||||
color: context.isDarkTheme
|
|
||||||
? Colors.white
|
|
||||||
: Colors.black.withAlpha(200),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
style: context.themeData.elevatedButtonTheme.style?.copyWith(
|
style: context.themeData.elevatedButtonTheme.style?.copyWith(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
|
@ -215,7 +211,7 @@ class LibraryPage extends HookConsumerWidget {
|
||||||
return trashEnabled
|
return trashEnabled
|
||||||
? InkWell(
|
? InkWell(
|
||||||
onTap: () => context.autoPush(const TrashRoute()),
|
onTap: () => context.autoPush(const TrashRoute()),
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: const BorderRadius.all(Radius.circular(12)),
|
||||||
child: const Icon(
|
child: const Icon(
|
||||||
Icons.delete_rounded,
|
Icons.delete_rounded,
|
||||||
size: 25,
|
size: 25,
|
||||||
|
|
|
@ -674,7 +674,6 @@ class BackupControllerPage extends HookConsumerWidget {
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
elevation: 0,
|
|
||||||
title: const Text(
|
title: const Text(
|
||||||
"backup_controller_page_backup",
|
"backup_controller_page_backup",
|
||||||
).tr(),
|
).tr(),
|
||||||
|
|
|
@ -222,7 +222,9 @@ class ImmichAssetGridViewState extends State<ImmichAssetGridView> {
|
||||||
padding: const EdgeInsets.only(left: 12.0, top: 24.0),
|
padding: const EdgeInsets.only(left: 12.0, top: 24.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
title,
|
title,
|
||||||
style: context.textTheme.displayLarge,
|
style: context.textTheme.displayLarge?.copyWith(
|
||||||
|
color: context.colorScheme.onSurface,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -617,7 +617,7 @@ class LoadingIcon extends StatelessWidget {
|
||||||
height: 24,
|
height: 24,
|
||||||
child: FittedBox(
|
child: FittedBox(
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
strokeWidth: 2,
|
strokeWidth: 5,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -52,13 +52,13 @@ class CuratedPlacesRow extends CuratedRow {
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
color: Colors.black,
|
color: context.colorScheme.shadow,
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: FractionalOffset.topCenter,
|
begin: FractionalOffset.topCenter,
|
||||||
end: FractionalOffset.bottomCenter,
|
end: FractionalOffset.bottomCenter,
|
||||||
colors: [
|
colors: [
|
||||||
Colors.blueGrey.withOpacity(0.0),
|
context.colorScheme.shadow.withOpacity(0.1),
|
||||||
Colors.black.withOpacity(0.4),
|
context.colorScheme.shadow.withOpacity(0.2),
|
||||||
],
|
],
|
||||||
stops: const [0.0, 0.4],
|
stops: const [0.0, 0.4],
|
||||||
),
|
),
|
||||||
|
|
|
@ -71,15 +71,15 @@ class ThumbnailWithInfo extends StatelessWidget {
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(borderRadius),
|
borderRadius: BorderRadius.circular(borderRadius),
|
||||||
color: Colors.white,
|
color: context.colorScheme.inverseSurface,
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: FractionalOffset.topCenter,
|
begin: FractionalOffset.topCenter,
|
||||||
end: FractionalOffset.bottomCenter,
|
end: FractionalOffset.bottomCenter,
|
||||||
colors: [
|
colors: [
|
||||||
context.colorScheme.surfaceVariant.withOpacity(0.0),
|
context.colorScheme.shadow.withOpacity(0),
|
||||||
textInfo == ''
|
textInfo == ''
|
||||||
? context.colorScheme.surface.withOpacity(0.1)
|
? context.colorScheme.shadow.withOpacity(0.1)
|
||||||
: context.colorScheme.surface.withOpacity(0.6),
|
: context.colorScheme.shadow.withOpacity(0.2),
|
||||||
],
|
],
|
||||||
stops: const [0.0, 1.0],
|
stops: const [0.0, 1.0],
|
||||||
),
|
),
|
||||||
|
|
|
@ -131,6 +131,7 @@ class ImmichAppBar extends ConsumerWidget implements PreferredSizeWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
return AppBar(
|
return AppBar(
|
||||||
|
elevation: 0.0,
|
||||||
backgroundColor: context.themeData.appBarTheme.backgroundColor,
|
backgroundColor: context.themeData.appBarTheme.backgroundColor,
|
||||||
shape: const RoundedRectangleBorder(
|
shape: const RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(
|
||||||
|
|
|
@ -30,9 +30,9 @@ class ImmichToast {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ToastType.info:
|
case ToastType.info:
|
||||||
return Icons.info_outline_rounded;
|
return Icons.info_outline_rounded;
|
||||||
case ToastType.error:
|
|
||||||
return Icons.check_circle_outline_rounded;
|
|
||||||
case ToastType.success:
|
case ToastType.success:
|
||||||
|
return Icons.check_circle_outline_rounded;
|
||||||
|
case ToastType.error:
|
||||||
return Icons.report_problem_outlined;
|
return Icons.report_problem_outlined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,9 @@ class SplashScreenPage extends HookConsumerWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(
|
||||||
|
elevation: 0.0,
|
||||||
|
),
|
||||||
body: const Center(
|
body: const Center(
|
||||||
child: Image(
|
child: Image(
|
||||||
image: AssetImage('assets/immich-logo-no-outline.png'),
|
image: AssetImage('assets/immich-logo-no-outline.png'),
|
||||||
|
|
|
@ -84,6 +84,8 @@ ThemeData getThemeForScheme(ColorScheme scheme) {
|
||||||
color: scheme.primary,
|
color: scheme.primary,
|
||||||
),
|
),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
|
scrolledUnderElevation: 4.0,
|
||||||
|
elevation: 4.0,
|
||||||
),
|
),
|
||||||
snackBarTheme: const SnackBarThemeData(
|
snackBarTheme: const SnackBarThemeData(
|
||||||
contentTextStyle: TextStyle(
|
contentTextStyle: TextStyle(
|
||||||
|
|
Loading…
Reference in a new issue