Skip to content

Commit

Permalink
Optimize when using variable fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
YuKongA committed Oct 26, 2024
1 parent 8916cf9 commit 73d9b96
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ android {
minSdk = 34
targetSdk = 35
versionCode = 3000
versionName = "3.0.0"
versionName = "3.0.0-VF"
}
val properties = Properties()
runCatching { properties.load(project.rootProject.file("local.properties").inputStream()) }
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/kotlin/top/yukonga/mediaControlBlur/MainHook.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import android.graphics.PorterDuff
import android.graphics.PorterDuffXfermode
import android.graphics.Rect
import android.graphics.RectF
import android.graphics.Typeface
import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.ClipDrawable
import android.graphics.drawable.GradientDrawable
Expand Down Expand Up @@ -129,6 +130,9 @@ class MainHook : IXposedHookLoadPackage {
val albumView = mMediaViewHolder.objectHelper().getObjectOrNullAs<ImageView>("albumView")
val appIcon = mMediaViewHolder.objectHelper().getObjectOrNullAs<ImageView>("appIcon")

titleText?.typeface = Typeface.create(titleText?.typeface, Typeface.NORMAL)
artistText?.typeface = Typeface.create(artistText?.typeface, Typeface.NORMAL)

val artwork = it.args[0].objectHelper().getObjectOrNullAs<Icon>("artwork") ?: return@createAfterHook
val artworkLayer = artwork.loadDrawable(context) ?: return@createAfterHook

Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
agp = "8.7.0"
agp = "8.7.1"
ezXHelper = "2.2.0"
kotlin = "2.0.20"
kotlin = "2.0.21"
xposed = "82"

[libraries]
Expand Down

0 comments on commit 73d9b96

Please sign in to comment.