feat: enhance titleBarOverlay to accept both a boolean and an object

This commit is contained in:
Denny09310
2025-11-08 11:14:33 +01:00
parent 758e6a41e3
commit 7927a95cb8
4 changed files with 61 additions and 2 deletions

View File

@@ -0,0 +1,18 @@
namespace ElectronNET.API.Entities;
public class TitleBarOverlay
{
private readonly bool? _value;
private TitleBarOverlay(bool value) => _value = value;
public string Color { get; set; }
public double Height { get; set; }
public string SymbolColor { get; set; }
public static implicit operator bool?(TitleBarOverlay titleBarOverlay) => titleBarOverlay?._value;
public static implicit operator TitleBarOverlay(bool value) => new(value);
}