mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 04:57:23 +00:00
Emphasize artworks from following artists
This commit is contained in:
@@ -37,6 +37,7 @@ class _Appdata {
|
||||
],
|
||||
"showOriginalImage": false,
|
||||
"checkUpdate": true,
|
||||
"emphasizeArtworksFromFollowingArtists": true,
|
||||
};
|
||||
|
||||
bool lock = false;
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
import 'package:pixes/appdata.dart';
|
||||
import 'package:pixes/components/animated_image.dart';
|
||||
import 'package:pixes/foundation/app.dart';
|
||||
import 'package:pixes/foundation/history.dart';
|
||||
@@ -70,6 +71,15 @@ class _IllustWidgetState extends State<IllustWidget> {
|
||||
child: Card(
|
||||
padding: EdgeInsets.zero,
|
||||
margin: EdgeInsets.zero,
|
||||
borderColor: () {
|
||||
return widget.illust.author.isFollowed &&
|
||||
appdata.settings[
|
||||
'emphasizeArtworksFromFollowingArtists']
|
||||
? ColorScheme.of(context).primary
|
||||
: ColorScheme.of(context)
|
||||
.outlineVariant
|
||||
.withOpacity(0.64);
|
||||
}(),
|
||||
child: GestureDetector(
|
||||
onTap: widget.onTap ??
|
||||
() {
|
||||
|
@@ -273,6 +273,19 @@ class _SettingsPageState extends State<SettingsPage> {
|
||||
});
|
||||
appdata.writeData();
|
||||
})),
|
||||
buildItem(
|
||||
title: "Emphasize artworks from following artists".tl,
|
||||
subtitle: "The border of the artworks will be darker".tl,
|
||||
action: ToggleSwitch(
|
||||
checked:
|
||||
appdata.settings['emphasizeArtworksFromFollowingArtists'],
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
appdata.settings[
|
||||
'emphasizeArtworksFromFollowingArtists'] = value;
|
||||
});
|
||||
appdata.writeData();
|
||||
})),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
Reference in New Issue
Block a user