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

Commit 662ef38c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix calculation of empty spaces" into rvc-dev am: 6813206e am: 2248146d am: 7b8c0830

Change-Id: Ie47f27ca93b1dd00716a4ce884d6d79466dc1add
parents 315011dc 7b8c0830
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -429,7 +429,8 @@ class ControlsUiControllerImpl @Inject constructor (
        }

        // add spacers if necessary to keep control size consistent
        var spacersToAdd = maxColumns - (selectedStructure.controls.size % maxColumns)
        val mod = selectedStructure.controls.size % maxColumns
        var spacersToAdd = if (mod == 0) 0 else maxColumns - mod
        while (spacersToAdd > 0) {
            lastRow.addView(Space(context), LinearLayout.LayoutParams(0, 0, 1f))
            spacersToAdd--