Bound the Block Analyzer's column count

As it stands, the block analyzer just chops off columns to the right if the window is too small and always internally runs off 256 columns. Since the analyzer is bounded to 256 colums, this qMax bound is totally pointless.
It also makes the demo asymmetrical which trips up my OCD whenever Clementine is idling...
This commit is contained in:
Mark Furneaux 2015-06-20 00:09:38 -04:00
parent 105ce0dbb7
commit 36d885b73d
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ void BlockAnalyzer::resizeEvent(QResizeEvent* e) {
// all is explained in analyze()..
// +1 to counter -1 in maxSizes, trust me we need this!
m_columns = qMax(static_cast<uint>(static_cast<double>(width() + 1) / (WIDTH + 1)), MAX_COLUMNS);
m_columns = qMin(static_cast<uint>(static_cast<double>(width() + 1) / (WIDTH + 1)) + 1, MAX_COLUMNS);
m_rows = static_cast<uint>(static_cast<double>(height() + 1) / (HEIGHT + 1));
// this is the y-offset for drawing from the top of the widget