public static IWidget Button(ButtonWidget widget) { widget.Decoration = (m, w) => { var box = new BoxWidget <IWidget>(w); box.Style = new Style(); box.Style.Foreground = Color.White; if (m.IsHovered) { box.Style.Background = Color.OliveDrab; } else { box.Style.Background = Color.DarkOliveGreen; } if (m.IsFocused) { box.Border = BorderStyle.DoubleLine; } else { box.Border = BorderStyle.SingleLine; } return(box); }; return(widget); }
public static BoxWidget <LabelWidget> Label(LabelWidget widget) { var box = new BoxWidget <LabelWidget>(widget); box.Style = new Style() { Foreground = Color.White, }; return(box); }