mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
parent
8f991001c1
commit
83b8a800d8
@ -234,12 +234,6 @@ namespace hyperion {
|
|||||||
midPointsY.erase(std::unique(midPointsY.begin(), midPointsY.end()), midPointsY.end());
|
midPointsY.erase(std::unique(midPointsY.begin(), midPointsY.end()), midPointsY.end());
|
||||||
|
|
||||||
QSize gridSize( midPointsX.size(), midPointsY.size() );
|
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
|
// Correct the grid in case it is malformed in width vs height
|
||||||
// Expected is at least 50% of width <-> height
|
// Expected is at least 50% of width <-> height
|
||||||
@ -248,6 +242,13 @@ namespace hyperion {
|
|||||||
else if((gridSize.width() / gridSize.height()) < 0.5)
|
else if((gridSize.width() / gridSize.height()) < 0.5)
|
||||||
gridSize.setWidth(qMax(1,gridSize.height()/2));
|
gridSize.setWidth(qMax(1,gridSize.height()/2));
|
||||||
|
|
||||||
|
// Limit to 80px for performance reasons
|
||||||
|
const int pl = 80;
|
||||||
|
if(gridSize.width() > pl || gridSize.height() > pl)
|
||||||
|
{
|
||||||
|
gridSize.scale(pl, pl, Qt::KeepAspectRatio);
|
||||||
|
}
|
||||||
|
|
||||||
return gridSize;
|
return gridSize;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user