mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
Choose a more homogenized(=compact) layout for mosaic if sizes are equivalent.
This commit is contained in:
parent
64ff12fb03
commit
9524833e95
1 changed files with 2 additions and 1 deletions
|
|
@ -84,7 +84,8 @@ ColumnLayout{
|
|||
for(var C = itemCount ; C >= 1 ; --C){
|
||||
if( R * C >= itemCount){// This is a good layout candidate
|
||||
var estimatedSize = Math.min(availableW / C, availableH / R)
|
||||
if(estimatedSize > bestSize){
|
||||
if(estimatedSize > bestSize // Size is better
|
||||
|| (estimatedSize == bestSize && Math.abs(bestR-bestC) > Math.abs(R - C) )){// Stickers are more homogenized
|
||||
bestSize = estimatedSize
|
||||
bestC = C
|
||||
bestR = R
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue