mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-17 22:26:00 +00:00
feat: enhance titleBarOverlay to accept both a boolean and an object
This commit is contained in:
18
src/ElectronNET.API/API/Entities/TitleBarOverlay.cs
Normal file
18
src/ElectronNET.API/API/Entities/TitleBarOverlay.cs
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user