Resolved #3568 - text buttons are less grainy

This commit is contained in:
Yair Morgenstern
2021-03-29 17:50:04 +03:00
parent bc5cc4e28d
commit 46e845d6ff

View File

@ -152,9 +152,11 @@ object ImageGetter {
} }
fun getRoundedEdgeTableBackground(tintColor: Color? = null): NinePatchDrawable { fun getRoundedEdgeTableBackground(tintColor: Color? = null): NinePatchDrawable {
val drawable = NinePatchDrawable(NinePatch(getDrawable("OtherIcons/buttonBackground").region, 25, 25, 0, 0)).apply { val region = getDrawable("OtherIcons/buttonBackground").region
setPadding(5f, 15f, 5f, 15f) region.texture.setFilter(Texture.TextureFilter.MipMapLinearNearest, Texture.TextureFilter.Linear)
} val drawable = NinePatchDrawable(NinePatch(region, 25, 25, 0, 0))
drawable.setPadding(5f, 15f, 5f, 15f)
if (tintColor == null) return drawable if (tintColor == null) return drawable
return drawable.tint(tintColor) return drawable.tint(tintColor)
} }