feat(lists): assign a colour to a sidebar folder

Tints the folder name and its guide line; picked from a swatch row in the folder settings.
This commit is contained in:
mika kuns
2026-09-30 10:12:41 +02:00
parent 8a31a67c74
commit bb92dc279f
15 changed files with 1257 additions and 9 deletions
@@ -9,6 +9,16 @@ namespace ClaudeDo.Ui.Converters;
// instantiate a generic FuncValueConverter as a resource; they stay one per type so the
// x:Key names in App.axaml keep resolving. Anything with real logic gets its own file.
/// <summary>"#RRGGBB" to a brush; anything else falls back to the app resource named by the parameter.</summary>
public sealed class HexBrushConverter : OneWayConverter
{
public static HexBrushConverter Instance { get; } = new();
public override object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
=> value is string s && Color.TryParse(s, out var c)
? new SolidColorBrush(c)
: Avalonia.Application.Current?.TryGetResource(parameter as string ?? "", null, out var res) == true ? res : null;
}
public sealed class UpperCaseConverter : OneWayConverter
{
public static UpperCaseConverter Instance { get; } = new();