New controls, main view

This commit is contained in:
2023-08-09 20:40:54 +02:00
parent d549733b71
commit 7dcca6363b
41 changed files with 668 additions and 234 deletions

View File

@@ -1,54 +1,29 @@
using FileTime.ConsoleUI.App;
using TerminalUI.Color;
using TerminalUI.Models;
using ConsoleColor = TerminalUI.Color.ConsoleColor;
namespace FileTime.ConsoleUI.Styles;
public record Theme(
IColor? ItemBackgroundColor,
IColor? AlternativeItemBackgroundColor,
IColor? SelectedItemBackgroundColor,
IColor? MarkedItemBackgroundColor,
IColor? MarkedAlternativeItemBackgroundColor,
IColor? MarkedSelectedItemBackgroundColor,
IColor? DefaultForegroundColor,
IColor? DefaultBackgroundColor,
IColor? AlternativeItemForegroundColor,
IColor? SelectedItemForegroundColor,
IColor? MarkedItemForegroundColor,
IColor? MarkedAlternativeItemForegroundColor,
IColor? MarkedSelectedItemForegroundColor) : ITheme;
IColor? ElementColor,
IColor? ContainerColor,
IColor? MarkedItemColor) : ITheme;
public static class DefaultThemes
{
public static Theme Color256Theme => new(
ItemBackgroundColor: Color256Colors.Backgrounds.Black,
AlternativeItemBackgroundColor: Color256Colors.Backgrounds.Black,
SelectedItemBackgroundColor: Color256Colors.Backgrounds.Black,
MarkedItemBackgroundColor: Color256Colors.Backgrounds.Black,
MarkedAlternativeItemBackgroundColor: Color256Colors.Backgrounds.Black,
MarkedSelectedItemBackgroundColor: Color256Colors.Backgrounds.Black,
DefaultForegroundColor: null,
DefaultBackgroundColor: null,
AlternativeItemForegroundColor: null,
SelectedItemForegroundColor: Color256Colors.Foregrounds.Black,
MarkedItemForegroundColor: Color256Colors.Foregrounds.White,
MarkedAlternativeItemForegroundColor: Color256Colors.Foregrounds.White,
MarkedSelectedItemForegroundColor: Color256Colors.Foregrounds.Cyan);
DefaultForegroundColor: Color256Colors.Foregrounds.Gray,
DefaultBackgroundColor: Color256Colors.Foregrounds.Black,
ElementColor: Color256Colors.Foregrounds.Gray,
ContainerColor: Color256Colors.Foregrounds.Blue,
MarkedItemColor: Color256Colors.Foregrounds.Black
);
public static Theme ConsoleColorTheme => new(
ItemBackgroundColor: ConsoleColors.Foregrounds.Black,
AlternativeItemBackgroundColor: ConsoleColors.Foregrounds.Black,
SelectedItemBackgroundColor: ConsoleColors.Foregrounds.Black,
MarkedItemBackgroundColor: ConsoleColors.Foregrounds.Black,
MarkedAlternativeItemBackgroundColor: ConsoleColors.Foregrounds.Black,
MarkedSelectedItemBackgroundColor: ConsoleColors.Foregrounds.Black,
DefaultForegroundColor: null,
DefaultBackgroundColor: null,
AlternativeItemForegroundColor: null,
SelectedItemForegroundColor: ConsoleColors.Foregrounds.Black,
MarkedItemForegroundColor: ConsoleColors.Foregrounds.White,
MarkedAlternativeItemForegroundColor: ConsoleColors.Foregrounds.White,
MarkedSelectedItemForegroundColor: ConsoleColors.Foregrounds.Cyan);
DefaultForegroundColor: ConsoleColors.Foregrounds.Gray,
DefaultBackgroundColor: ConsoleColors.Foregrounds.Black,
ElementColor: ConsoleColors.Foregrounds.Gray,
ContainerColor: ConsoleColors.Foregrounds.Blue,
MarkedItemColor: ConsoleColors.Foregrounds.Black);
}