+
+ // TODO: this is just a very rough testing code to calculate the grid
+ // width and height
+ int gridWidth = defaultSize;
+ int gridHeight = defaultSize;
+ const int textSizeIndex = m_textWidthBox->currentIndex();
+ if (arrangement == QListView::TopToBottom) {
+ gridWidth += 96 + textSizeIndex * 32;
+ gridHeight += 64;
+ }
+ else {
+ gridWidth += 128 + textSizeIndex * 64;
+ }
+
+ settings->setGridWidth(gridWidth);
+ settings->setGridHeight(gridHeight);