mirror of
https://github.com/immich-app/immich.git
synced 2025-11-12 21:52:42 +09:00
fixed delete dialog colors
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/src/widgets/framework.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/modules/home/providers/home_page_render_list_provider.dart';
|
||||
@@ -52,7 +48,9 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
Widget _buildThumbnailOrPlaceholder(
|
||||
AssetResponseDto asset, bool placeholder) {
|
||||
AssetResponseDto asset,
|
||||
bool placeholder,
|
||||
) {
|
||||
if (placeholder) {
|
||||
return const DecoratedBox(
|
||||
decoration: BoxDecoration(color: Colors.grey),
|
||||
@@ -67,7 +65,10 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
Widget _buildAssetRow(
|
||||
BuildContext context, RenderAssetGridRow row, bool scrolling) {
|
||||
BuildContext context,
|
||||
RenderAssetGridRow row,
|
||||
bool scrolling,
|
||||
) {
|
||||
double size = _getItemSize(context);
|
||||
|
||||
return Row(
|
||||
@@ -87,7 +88,10 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
Widget _buildTitle(
|
||||
BuildContext context, String title, List<AssetResponseDto> assets) {
|
||||
BuildContext context,
|
||||
String title,
|
||||
List<AssetResponseDto> assets,
|
||||
) {
|
||||
return DailyTitleText(
|
||||
isoDate: title,
|
||||
assetGroup: assets,
|
||||
@@ -128,7 +132,8 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
||||
|
||||
Text _labelBuilder(int pos) {
|
||||
final date = renderList[pos].date;
|
||||
return Text(DateFormat.yMMMd().format(date),
|
||||
return Text(
|
||||
DateFormat.yMMMd().format(date),
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -149,19 +154,20 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
return DraggableScrollbar.semicircle(
|
||||
scrollStateListener: dragScrolling,
|
||||
scrollStateListener: dragScrolling,
|
||||
itemPositionsListener: _itemPositionsListener,
|
||||
controller: _itemScrollController,
|
||||
backgroundColor: Theme.of(context).hintColor,
|
||||
labelTextBuilder: _labelBuilder,
|
||||
labelConstraints: const BoxConstraints(maxHeight: 28),
|
||||
scrollbarAnimationDuration: const Duration(seconds: 1),
|
||||
scrollbarTimeToFade: const Duration(seconds: 4),
|
||||
child: ScrollablePositionedList.builder(
|
||||
itemBuilder: itemBuilder,
|
||||
itemPositionsListener: _itemPositionsListener,
|
||||
controller: _itemScrollController,
|
||||
backgroundColor: Theme.of(context).hintColor,
|
||||
labelTextBuilder: _labelBuilder,
|
||||
labelConstraints: const BoxConstraints(maxHeight: 28),
|
||||
scrollbarAnimationDuration: const Duration(seconds: 1),
|
||||
scrollbarTimeToFade: const Duration(seconds: 4),
|
||||
child: ScrollablePositionedList.builder(
|
||||
itemBuilder: itemBuilder,
|
||||
itemPositionsListener: _itemPositionsListener,
|
||||
itemScrollController: _itemScrollController,
|
||||
itemCount: renderList.length,
|
||||
));
|
||||
itemScrollController: _itemScrollController,
|
||||
itemCount: renderList.length,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ class DeleteDialog extends ConsumerWidget {
|
||||
final homePageState = ref.watch(homePageStateProvider);
|
||||
|
||||
return AlertDialog(
|
||||
backgroundColor: Colors.grey[200],
|
||||
// backgroundColor: Colors.grey[200],
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
||||
title: const Text("delete_dialog_title").tr(),
|
||||
content: const Text("delete_dialog_alert").tr(),
|
||||
@@ -21,9 +21,12 @@ class DeleteDialog extends ConsumerWidget {
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: const Text(
|
||||
child: Text(
|
||||
"delete_dialog_cancel",
|
||||
style: TextStyle(color: Colors.blueGrey),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
).tr(),
|
||||
),
|
||||
TextButton(
|
||||
@@ -37,7 +40,10 @@ class DeleteDialog extends ConsumerWidget {
|
||||
},
|
||||
child: Text(
|
||||
"delete_dialog_ok",
|
||||
style: TextStyle(color: Colors.red[400]),
|
||||
style: TextStyle(
|
||||
color: Colors.red[400],
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
).tr(),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -30,7 +30,6 @@ class ImageGrid extends ConsumerWidget {
|
||||
),
|
||||
delegate: SliverChildBuilderDelegate(
|
||||
(BuildContext context, int index) {
|
||||
var assetType = assetGroup[index].type;
|
||||
return GestureDetector(
|
||||
onTap: () {},
|
||||
child: ThumbnailImage(
|
||||
|
||||
Reference in New Issue
Block a user