Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit 0008a939 authored by Kshitij's avatar Kshitij Committed by Saalim Quadri
Browse files

feat: Set icon scale to upto 1.4f dynamically

parent ea6b9448
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import android.annotation.TargetApi;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
@@ -472,8 +473,9 @@ public class InvariantDeviceProfile implements SafeCloseable, OnSharedPreference
        for (WindowBounds bounds : displayInfo.supportedBounds) {
            boolean isTablet = displayInfo.isTablet(bounds);
            if (isTablet) {
                iconSize[INDEX_DEFAULT] *= 1.6f;
                iconSize[INDEX_LANDSCAPE] *= 1.6f;
                Configuration config = new Configuration(context.getResources().getConfiguration());
                iconSize[INDEX_DEFAULT] *= config.smallestScreenWidthDp < 660 ? 1.15f : 1.4f;
                iconSize[INDEX_LANDSCAPE] *= config.smallestScreenWidthDp < 660 ? 1.15f : 1.4f;
                break;
            }
        }