Skip to content

Commit

Permalink
Disable rounded corners/shadow and darken background of light theme (#…
Browse files Browse the repository at this point in the history
…442)

IMHO it looks much better. (I kind of stole the new background color
from a preview screenshot of Sync for Lemmy).

This also renames the options for rounding/shadow so that it resets
existing user settings.
That way, people have to see the new look, dislike it and _actively
choose_ to go back to the old look.


![Screenshot_20230723-005955.png](https://github.com/liftoff-app/liftoff/assets/856493/b9282522-811b-4e63-b995-7aaf8923f85d)
![Screenshot_20230723-005922.png](https://github.com/liftoff-app/liftoff/assets/856493/28149a48-7291-4406-9ed6-631f929bd220)
  • Loading branch information
shocklateboy92 authored Jul 23, 2023
1 parent 8fa4645 commit 13ee1c2
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 34 deletions.
8 changes: 4 additions & 4 deletions lib/pages/settings/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions lib/resources/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions lib/stores/config_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
45 changes: 23 additions & 22 deletions lib/stores/config_store.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/widgets/post/post.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
Expand Down

0 comments on commit 13ee1c2

Please sign in to comment.