mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
feat: Add on/off/blurred options to the background image (#442)
Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
ef6780b412
commit
715e707bb6
8 changed files with 109 additions and 63 deletions
|
|
@ -28,6 +28,28 @@ enum GlobalHotKeys {
|
|||
}
|
||||
}
|
||||
|
||||
enum BackgroundType {
|
||||
disabled,
|
||||
enabled,
|
||||
blurred;
|
||||
|
||||
const BackgroundType();
|
||||
|
||||
double get opacityValues => switch (this) {
|
||||
BackgroundType.disabled => 1.0,
|
||||
BackgroundType.enabled => 0.7,
|
||||
BackgroundType.blurred => 0.5,
|
||||
};
|
||||
|
||||
String label(BuildContext context) {
|
||||
return switch (this) {
|
||||
BackgroundType.disabled => context.localized.off,
|
||||
BackgroundType.enabled => context.localized.enabled,
|
||||
BackgroundType.blurred => context.localized.blurred,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@Freezed(copyWith: true)
|
||||
class ClientSettingsModel with _$ClientSettingsModel {
|
||||
const ClientSettingsModel._();
|
||||
|
|
@ -52,7 +74,7 @@ class ClientSettingsModel with _$ClientSettingsModel {
|
|||
@Default(false) bool showAllCollectionTypes,
|
||||
@Default(2) int maxConcurrentDownloads,
|
||||
@Default(DynamicSchemeVariant.rainbow) DynamicSchemeVariant schemeVariant,
|
||||
@Default(true) bool backgroundPosters,
|
||||
@Default(BackgroundType.blurred) BackgroundType backgroundImage,
|
||||
@Default(true) bool checkForUpdates,
|
||||
@Default(false) bool usePosterForLibrary,
|
||||
String? lastViewedUpdate,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue