-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(seek): Added the ability to seek.
- Loading branch information
1 parent
1feb6fe
commit a6cb88b
Showing
14 changed files
with
382 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
OpenLyricsClient/Frontend/Extensions/ColorBrushExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using Avalonia.Media; | ||
|
||
namespace OpenLyricsClient.Frontend.Extensions; | ||
|
||
public static class ColorBrushExtension | ||
{ | ||
public static SolidColorBrush AdjustBrightness(this SolidColorBrush solidColorBrush, double percentage) | ||
{ | ||
Color color = solidColorBrush.Color; | ||
|
||
byte r = (byte)((color.R * 0.01) * percentage); | ||
byte g = (byte)((color.G * 0.01) * percentage); | ||
byte b = (byte)((color.B * 0.01) * percentage); | ||
|
||
r = Math.Clamp(r, (byte)0, (byte)255); | ||
g = Math.Clamp(g, (byte)0, (byte)255); | ||
b = Math.Clamp(b, (byte)0, (byte)255); | ||
|
||
return new SolidColorBrush(new Color(color.A, r, g, b)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.