Details ausgearbeitet
Linked colors to options menu Options extension Aussehen aufgebohrt: - erlaubt text von status zu ändern, - bessere beschriftung von Farben desing änderung und bedienung - heute status felder anklickbar, - Farbpalette verdunkelt und kontrast reduziert - Kalender Tage anklickbar gemacht - Optionen überarbeitet
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Graphics;
|
||||
|
||||
namespace cfs_tracker.Helpers;
|
||||
|
||||
public static class ThemeResourceHelper
|
||||
{
|
||||
public static Color GetColor(string key, string fallbackHex = "#FFFFFF")
|
||||
{
|
||||
if (Application.Current?.Resources.TryGetValue(key, out var value) == true && value is Color color)
|
||||
return color;
|
||||
|
||||
return Color.FromArgb(fallbackHex);
|
||||
}
|
||||
|
||||
public static string GetString(string key, string fallback = "")
|
||||
{
|
||||
if (Application.Current?.Resources.TryGetValue(key, out var value) == true && value is string text)
|
||||
return text;
|
||||
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user