-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get them out of Properties.Settings.Default, that way a future cross patform version can still read the old preferences
- Loading branch information
Showing
40 changed files
with
856 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
|
||
namespace COMPASS.Models.Preferences | ||
{ | ||
public class CardLayoutPreferences : ObservableObject | ||
{ | ||
private bool _showTitle = true; | ||
public bool ShowTitle | ||
{ | ||
get => _showTitle; | ||
set => SetProperty(ref _showTitle, value); | ||
} | ||
|
||
public bool ShowAuthor | ||
{ | ||
get => Properties.Settings.Default.CardShowAuthor; | ||
set | ||
{ | ||
Properties.Settings.Default.CardShowAuthor = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public bool ShowPublisher | ||
{ | ||
get => Properties.Settings.Default.CardShowPublisher; | ||
set | ||
{ | ||
Properties.Settings.Default.CardShowPublisher = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public bool ShowReleaseDate | ||
{ | ||
get => Properties.Settings.Default.CardShowRelease; | ||
set | ||
{ | ||
Properties.Settings.Default.CardShowRelease = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public bool ShowVersion | ||
{ | ||
get => Properties.Settings.Default.CardShowVersion; | ||
set | ||
{ | ||
Properties.Settings.Default.CardShowVersion = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public bool ShowRating | ||
{ | ||
get => Properties.Settings.Default.CardShowRating; | ||
set | ||
{ | ||
Properties.Settings.Default.CardShowRating = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public bool ShowTags | ||
{ | ||
get => Properties.Settings.Default.CardShowTags; | ||
set | ||
{ | ||
Properties.Settings.Default.CardShowTags = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
|
||
public bool ShowFileIcons | ||
{ | ||
get => Properties.Settings.Default.CardShowFileIcons; | ||
set | ||
{ | ||
Properties.Settings.Default.CardShowFileIcons = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
|
||
namespace COMPASS.Models.Preferences | ||
{ | ||
public class HomeLayoutPreferences : ObservableObject | ||
{ | ||
public double TileWidth | ||
{ | ||
get => Properties.Settings.Default.HomeCoverSize; | ||
set | ||
{ | ||
Properties.Settings.Default.HomeCoverSize = value; | ||
OnPropertyChanged(); | ||
OnPropertyChanged(nameof(TileHeight)); | ||
} | ||
} | ||
|
||
public double TileHeight => (int)(TileWidth * 4 / 3); | ||
|
||
public bool ShowTitle | ||
{ | ||
get => Properties.Settings.Default.HomeShowTitle; | ||
set | ||
{ | ||
Properties.Settings.Default.HomeShowTitle = value; | ||
OnPropertyChanged(); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.