mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Add OSC opacity adjustment
This commit is contained in:
committed by
Niccolò Betto
parent
d129fb09cd
commit
3407f6d530
@ -79,6 +79,7 @@ abstract class OnScreenButton(
|
||||
buttonSymbolPaint.apply {
|
||||
textSize = size
|
||||
textAlign = Paint.Align.LEFT
|
||||
alpha = (config.opacity / 100.0 * 255).toInt()
|
||||
getTextBounds(text, 0, text.length, textBoundsRect)
|
||||
}
|
||||
canvas.drawText(text, x - textBoundsRect.width() / 2f - textBoundsRect.left, y + textBoundsRect.height() / 2f - textBoundsRect.bottom, buttonSymbolPaint)
|
||||
@ -88,6 +89,7 @@ abstract class OnScreenButton(
|
||||
val bounds = currentBounds
|
||||
drawable.apply {
|
||||
this.bounds = bounds
|
||||
alpha = (config.opacity / 100.0 * 255).toInt()
|
||||
draw(canvas)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user