d85f2e0fb3
Bootstraper läd jetzt die farbeinstellung sofort und nicht nachträglich cleanup and rework PDF switch to HTML export fix Colorsystem Farben für knöpfe hinzugefügt als anpassung button color button color primary and secondary change
24 lines
644 B
C#
24 lines
644 B
C#
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using cfs_tracker.Helpers;
|
|
using Microsoft.Maui.Graphics;
|
|
|
|
namespace cfs_tracker.ViewModels;
|
|
|
|
public partial class AppearanceColorItemViewModel : ObservableObject
|
|
{
|
|
public string Key { get; init; } = string.Empty;
|
|
public string Title { get; init; } = string.Empty;
|
|
public string Fallback { get; init; } = "#000000";
|
|
|
|
[ObservableProperty]
|
|
private string value = string.Empty;
|
|
|
|
[ObservableProperty]
|
|
private Color previewColor = Colors.Transparent;
|
|
|
|
partial void OnValueChanged(string value)
|
|
{
|
|
PreviewColor = ColorUtility.ParseColor(value, Fallback);
|
|
}
|
|
}
|