diff --git a/lib/pages/settings/settings.dart b/lib/pages/settings/settings.dart index 6ea4a13a..e8a29398 100644 --- a/lib/pages/settings/settings.dart +++ b/lib/pages/settings/settings.dart @@ -212,16 +212,16 @@ class PostStyleConfigPage extends StatelessWidget { SwitchListTile.adaptive( title: Text(L10n.of(context).post_style_rounded_corners), - value: store.postRoundedCorners, + value: store.postRoundedCornersV2, onChanged: (checked) { - store.postRoundedCorners = checked; + store.postRoundedCornersV2 = checked; }, ), SwitchListTile.adaptive( title: Text(L10n.of(context).post_style_shadow), - value: store.postCardShadow, + value: store.postCardShadowV2, onChanged: (checked) { - store.postCardShadow = checked; + store.postCardShadowV2 = checked; }, ), SwitchListTile.adaptive( diff --git a/lib/resources/theme.dart b/lib/resources/theme.dart index ef22ec3d..4f0d30a1 100644 --- a/lib/resources/theme.dart +++ b/lib/resources/theme.dart @@ -13,8 +13,8 @@ ThemeData themeFactory( canvasColor: Colors.grey[850], cardColor: Colors.grey.shade900) : ThemeData.light().copyWith( - colorScheme: const ColorScheme.light(background: Color(0xfffaf9fc)), - canvasColor: const Color(0xfffaf9fc), + colorScheme: const ColorScheme.light(background: Color(0xFFE9EEF8)), + canvasColor: const Color(0xFFE9EEF8), ); final backgroundColor = amoled ? Colors.black : theme.colorScheme.background; final canvasColor = amoled ? Colors.black : theme.canvasColor; diff --git a/lib/stores/config_store.dart b/lib/stores/config_store.dart index 9ebd64d0..d8c6d052 100644 --- a/lib/stores/config_store.dart +++ b/lib/stores/config_store.dart @@ -63,12 +63,12 @@ abstract class _ConfigStore with Store { bool compactPostView = false; @observable - @JsonKey(defaultValue: true) - bool postRoundedCorners = true; + @JsonKey(defaultValue: false) + bool postRoundedCornersV2 = false; @observable - @JsonKey(defaultValue: true) - bool postCardShadow = true; + @JsonKey(defaultValue: false) + bool postCardShadowV2 = false; @observable @JsonKey(defaultValue: true) diff --git a/lib/stores/config_store.g.dart b/lib/stores/config_store.g.dart index 3c4b2382..0818500d 100644 --- a/lib/stores/config_store.g.dart +++ b/lib/stores/config_store.g.dart @@ -12,8 +12,8 @@ ConfigStore _$ConfigStoreFromJson(Map json) => ConfigStore() ..convertWebpToPng = json['convertWebpToPng'] as bool? ?? false ..locale = const LocaleConverter().fromJson(json['locale'] as String?) ..compactPostView = json['compactPostView'] as bool? ?? false - ..postRoundedCorners = json['postRoundedCorners'] as bool? ?? true - ..postCardShadow = json['postCardShadow'] as bool? ?? true + ..postRoundedCornersV2 = json['postRoundedCornersV2'] as bool? ?? false + ..postCardShadowV2 = json['postCardShadowV2'] as bool? ?? false ..showAvatars = json['showAvatars'] as bool? ?? true ..showScores = json['showScores'] as bool? ?? true ..blurNsfw = json['blurNsfw'] as bool? ?? true @@ -43,8 +43,8 @@ Map _$ConfigStoreToJson(ConfigStore instance) => 'convertWebpToPng': instance.convertWebpToPng, 'locale': const LocaleConverter().toJson(instance.locale), 'compactPostView': instance.compactPostView, - 'postRoundedCorners': instance.postRoundedCorners, - 'postCardShadow': instance.postCardShadow, + 'postRoundedCornersV2': instance.postRoundedCornersV2, + 'postCardShadowV2': instance.postCardShadowV2, 'showAvatars': instance.showAvatars, 'showScores': instance.showScores, 'blurNsfw': instance.blurNsfw, @@ -151,35 +151,36 @@ mixin _$ConfigStore on _ConfigStore, Store { }); } - late final _$postRoundedCornersAtom = - Atom(name: '_ConfigStore.postRoundedCorners', context: context); + late final _$postRoundedCornersV2Atom = + Atom(name: '_ConfigStore.postRoundedCornersV2', context: context); @override - bool get postRoundedCorners { - _$postRoundedCornersAtom.reportRead(); - return super.postRoundedCorners; + bool get postRoundedCornersV2 { + _$postRoundedCornersV2Atom.reportRead(); + return super.postRoundedCornersV2; } @override - set postRoundedCorners(bool value) { - _$postRoundedCornersAtom.reportWrite(value, super.postRoundedCorners, () { - super.postRoundedCorners = value; + set postRoundedCornersV2(bool value) { + _$postRoundedCornersV2Atom.reportWrite(value, super.postRoundedCornersV2, + () { + super.postRoundedCornersV2 = value; }); } - late final _$postCardShadowAtom = - Atom(name: '_ConfigStore.postCardShadow', context: context); + late final _$postCardShadowV2Atom = + Atom(name: '_ConfigStore.postCardShadowV2', context: context); @override - bool get postCardShadow { - _$postCardShadowAtom.reportRead(); - return super.postCardShadow; + bool get postCardShadowV2 { + _$postCardShadowV2Atom.reportRead(); + return super.postCardShadowV2; } @override - set postCardShadow(bool value) { - _$postCardShadowAtom.reportWrite(value, super.postCardShadow, () { - super.postCardShadow = value; + set postCardShadowV2(bool value) { + _$postCardShadowV2Atom.reportWrite(value, super.postCardShadowV2, () { + super.postCardShadowV2 = value; }); } @@ -503,8 +504,8 @@ useInAppBrowser: ${useInAppBrowser}, convertWebpToPng: ${convertWebpToPng}, locale: ${locale}, compactPostView: ${compactPostView}, -postRoundedCorners: ${postRoundedCorners}, -postCardShadow: ${postCardShadow}, +postRoundedCornersV2: ${postRoundedCornersV2}, +postCardShadowV2: ${postCardShadowV2}, showAvatars: ${showAvatars}, showScores: ${showScores}, blurNsfw: ${blurNsfw}, diff --git a/lib/widgets/post/post.dart b/lib/widgets/post/post.dart index 8380fe8f..7c3e2472 100644 --- a/lib/widgets/post/post.dart +++ b/lib/widgets/post/post.dart @@ -99,11 +99,11 @@ class _Post extends HookWidget { onTrigger: (action) => loggedInAction(action.invoke)(), child: DecoratedBox( decoration: BoxDecoration( - boxShadow: store.postCardShadow + boxShadow: store.postCardShadowV2 ? const [BoxShadow(blurRadius: 5, color: Colors.black45)] : null, color: theme.cardColor, - borderRadius: store.postRoundedCorners + borderRadius: store.postRoundedCornersV2 ? const BorderRadius.all(Radius.circular(PostTile.rounding)) : null, ),