fix: GridSize change, show brightness compensation (#746)

* show brightness compensation and set to 0

* New gridLayout calculation and px limiter
This commit is contained in:
brindosch 2020-03-27 16:08:42 +01:00 committed by GitHub
parent 133399c6b6
commit 20a5e5dc06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 2 deletions

View File

@ -259,6 +259,18 @@ namespace hyperion {
QSize gridSize( midPointsX.size(), midPointsY.size() );
//Debug(_log, "LED layout grid size: %dx%d", gridSize.width(), gridSize.height());
// Limit to 80px for performance reasons
const int pl = 80;
if(gridSize.width() > pl || gridSize.height() > pl)
gridSize.scale(pl, pl, Qt::KeepAspectRatio);
// Correct the grid in case it is malformed in width vs height
// Expected is at least 50% of width <-> height
if((gridSize.width() / gridSize.height()) > 2)
gridSize.setHeight(qMax(1,gridSize.width()/2));
else if((gridSize.width() / gridSize.height()) < 0.5)
gridSize.setWidth(qMax(1,gridSize.height()/2));
return gridSize;
}
};

View File

@ -195,9 +195,8 @@
"required" : true,
"minimum" : 0,
"maximum": 100,
"default" : 90,
"default" : 0,
"append" : "edt_append_percent",
"access" : "advanced",
"propertyOrder" : 14
},
"gammaRed" :