From 676df39fed90930285b901f318f8629fb5377e57 Mon Sep 17 00:00:00 2001 From: DrDisagree Date: Sun, 2 Jun 2024 16:53:15 +0600 Subject: [PATCH] Vertical Tiles: Fix compatibility with text size changer --- .../iconify/xposed/modules/QuickSettings.kt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/drdisagree/iconify/xposed/modules/QuickSettings.kt b/app/src/main/java/com/drdisagree/iconify/xposed/modules/QuickSettings.kt index 3c27756f4..2c29900fe 100644 --- a/app/src/main/java/com/drdisagree/iconify/xposed/modules/QuickSettings.kt +++ b/app/src/main/java/com/drdisagree/iconify/xposed/modules/QuickSettings.kt @@ -898,17 +898,25 @@ class QuickSettings(context: Context?) : ModPack(context!!) { private fun setLabelSizes(paramThisObject: Any) { try { + val textSize = mContext.resources.getDimensionPixelSize( + mContext.resources.getIdentifier( + "qs_tile_text_size", + "dimen", + mContext.packageName + ) + ) + if (qsTilePrimaryTextSize != null && qsTilePrimaryTextSizeUnit != -1) { (getObjectField(paramThisObject, "label") as TextView).setTextSize( qsTilePrimaryTextSizeUnit, - qsTilePrimaryTextSize!! + textSize.toFloat() ) } if (qsTileSecondaryTextSize != null && qsTileSecondaryTextSizeUnit != -1) { (getObjectField(paramThisObject, "secondaryLabel") as TextView).setTextSize( qsTileSecondaryTextSizeUnit, - (qsTileSecondaryTextSize!! * 0.92).toFloat() + (textSize * 0.92).toFloat() ) } } catch (ignored: Throwable) {