mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 21:38:38 +00:00
reduced min % of key highlighted for coloring to occur (fixes large buttons like shift and space)
This commit is contained in:
parent
ec5c4d82e8
commit
84523b47b4
@ -29,7 +29,7 @@ namespace Artemis.KeyboardProviders.Corsair
|
||||
_keyboard = CueSDK.KeyboardSDK;
|
||||
_keyboard.UpdateMode = UpdateMode.Manual;
|
||||
_keyboard.Brush = new SolidColorBrush(Color.Black);
|
||||
_keyboard.Update();
|
||||
_keyboard.Update(true);
|
||||
}
|
||||
|
||||
public override void Disable()
|
||||
@ -51,10 +51,17 @@ namespace Artemis.KeyboardProviders.Corsair
|
||||
for (var y = 0; y < bitmap.Height; y++)
|
||||
{
|
||||
ledRectangles[x, y] = new RectangleF(_keyboard.KeyboardRectangle.X * (x*(_keyboard.KeyboardRectangle.Width / bitmap.Width / _keyboard.KeyboardRectangle.X)), _keyboard.KeyboardRectangle.Y*(y*(_keyboard.KeyboardRectangle.Height / bitmap.Height / _keyboard.KeyboardRectangle.Y)), _keyboard.KeyboardRectangle.Width / bitmap.Width, _keyboard.KeyboardRectangle.Height / bitmap.Height);
|
||||
ledGroups[x, y] = new RectangleKeyGroup(_keyboard, ledRectangles[x, y], 0.1f) { Brush = new SolidColorBrush(bitmap.GetPixel(x, y)) };
|
||||
ledGroups[x, y] = new RectangleKeyGroup(_keyboard, ledRectangles[x, y], 0.01f) { Brush = new SolidColorBrush(bitmap.GetPixel(x, y)) };
|
||||
}
|
||||
}
|
||||
_keyboard.Update(true);
|
||||
_keyboard.Update();
|
||||
for (var x = 0; x < bitmap.Width; x++)
|
||||
{
|
||||
for (var y = 0; y < bitmap.Height; y++)
|
||||
{
|
||||
_keyboard.DetachKeyGroup(ledGroups[x, y]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user