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

Commit 2248146d 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

Change-Id: Idb455cf7908c0ddd3fbdb07e4014c011c0a5ac35
parents ec733dcc 6813206e
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--