Skip to content

Commit fe6e9e0

Browse files
authored
Merge pull request #240 from Piwigo/change_modal_folder_box_colors
Change modal folder box colors
2 parents 090c4dc + e19c070 commit fe6e9e0

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

lib/components/modals/select_move_or_copy_modal.dart

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'package:piwigo_ng/models/album_model.dart';
44
import 'package:piwigo_ng/network/albums.dart';
55
import 'package:piwigo_ng/network/api_error.dart';
66
import 'package:piwigo_ng/utils/localizations.dart';
7-
import 'package:piwigo_ng/utils/resources.dart';
87

98
class SelectMoveOrCopyModal extends StatefulWidget {
109
const SelectMoveOrCopyModal({
@@ -243,15 +242,12 @@ class _ExpansionAlbumTileState extends State<ExpansionAlbumTile> {
243242
child: Row(spacing: 4, children: [
244243
Text(
245244
'${widget.album.nbCategories}',
246-
style: TextStyle(
247-
color: Theme.of(context).colorScheme.inverseSurface,
248-
fontSize: 14,
249-
),
245+
style: Theme.of(context).textTheme.labelMedium,
250246
),
251247
Icon(
252248
Icons.folder,
253249
size: 15,
254-
color: Theme.of(context).colorScheme.inverseSurface,
250+
color: Theme.of(context).textTheme.labelMedium?.color,
255251
),
256252
]),
257253
)),

lib/utils/resources.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ class AppColors {
4040
static const Color lightPink = const Color(0xFFFFCFCF);
4141
static const Color pink = const Color(0xFFFF5252);
4242

43+
static const Color textOnBackgroundLight = Color.fromARGB(255, 77, 77, 77);
44+
static const Color textOnBackgroundDark = Color.fromARGB(255, 237, 237, 237);
45+
46+
4347
static const List<Color> foregroundColors = [
4448
AppColors.green,
4549
AppColors.orange,

lib/utils/themes.dart

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ final ThemeData lightTheme = ThemeData.light(useMaterial3: true).copyWith(
129129
color: AppColors.black,
130130
letterSpacing: 0,
131131
),
132+
labelMedium:
133+
TextStyle(fontSize: 14, color: AppColors.textOnBackgroundLight),
132134
bodySmall: TextStyle(
133135
fontSize: 14,
134136
color: const Color(0x80000000),
@@ -168,7 +170,8 @@ final ThemeData lightTheme = ThemeData.light(useMaterial3: true).copyWith(
168170
color: AppColors.black,
169171
fontWeight: FontWeight.normal,
170172
),
171-
), dialogTheme: DialogThemeData(backgroundColor: AppColors.backgroundLight),
173+
),
174+
dialogTheme: DialogThemeData(backgroundColor: AppColors.backgroundLight),
172175
);
173176

174177
final ThemeData darkTheme = ThemeData.dark(useMaterial3: true).copyWith(
@@ -298,6 +301,10 @@ final ThemeData darkTheme = ThemeData.dark(useMaterial3: true).copyWith(
298301
color: AppColors.white,
299302
letterSpacing: 0,
300303
),
304+
labelMedium: TextStyle(
305+
fontSize: 14,
306+
color: AppColors.textOnBackgroundDark
307+
),
301308
bodySmall: TextStyle(
302309
fontSize: 14,
303310
color: const Color(0x80FFFFFF),
@@ -327,5 +334,6 @@ final ThemeData darkTheme = ThemeData.dark(useMaterial3: true).copyWith(
327334
color: AppColors.white,
328335
fontWeight: FontWeight.bold,
329336
),
330-
), dialogTheme: DialogThemeData(backgroundColor: AppColors.backgroundDark),
337+
),
338+
dialogTheme: DialogThemeData(backgroundColor: AppColors.backgroundDark),
331339
);

0 commit comments

Comments
 (0)