Added base class for location/size-handling and refactored devices and leds to make use of it

This commit is contained in:
DarthAffe committed 2021-02-09 23:11:01 +01:00
1 parent 6a4ebb3d2a
commit d44223ee6a
21 files changed
+349 -322

No files matched your search

@@ -50,13 +50,7 @@ namespace RGB.NET.Devices.Novation
public void Initialize(IDeviceUpdateTrigger updateTrigger)
{
InitializeLayout();
if (Size == Size.Invalid)
{
Rectangle ledRectangle = new(this.Select(x => x.LedRectangle));
Size = ledRectangle.Size + new Size(ledRectangle.Location.X, ledRectangle.Location.Y);
}
UpdateQueue = DeviceInfo.ColorCapabilities switch
{
NovationColorCapabilities.LimitedRG => new LimitedColorUpdateQueue(updateTrigger, DeviceInfo.DeviceId),