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

Commit 8c93c865 authored by Kshitij's avatar Kshitij
Browse files

Merge branch '2813os-u-fixsuggestions' into 'v1-u'

fix: Properly pick width for app suggestions

See merge request e/os/BlissLauncher3!80
parents c1205a11 e193aa4c
Loading
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -186,9 +186,10 @@ class BlissInput(context: Context, attrs: AttributeSet) :
    }

    private fun createAppView(info: AppInfo): BubbleTextView {
        val parentWidth = (mIconGrid.parent as View).width
        val width =
            idp.getDeviceProfile(context).availableWidthPx -
                ResourceUtils.pxFromDp(48f, context.resources.displayMetrics)
            (if (parentWidth == 0) idp.getDeviceProfile(context).availableWidthPx
            else parentWidth) - ResourceUtils.pxFromDp(48f, context.resources.displayMetrics)
        val padding = ((width / idp.numColumns) - idp.iconBitmapSize) / 2
        return (LayoutInflater.from(context).inflate(R.layout.app_icon, null) as BubbleTextView)
            .apply {