mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
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:
parent
133399c6b6
commit
20a5e5dc06
@ -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;
|
||||
}
|
||||
};
|
||||
|
@ -195,9 +195,8 @@
|
||||
"required" : true,
|
||||
"minimum" : 0,
|
||||
"maximum": 100,
|
||||
"default" : 90,
|
||||
"default" : 0,
|
||||
"append" : "edt_append_percent",
|
||||
"access" : "advanced",
|
||||
"propertyOrder" : 14
|
||||
},
|
||||
"gammaRed" :
|
||||
|
Loading…
Reference in New Issue
Block a user