comparison main/main.cpp @ 379:3d1c69b2215e

* Merge
author Chris Cannam
date Mon, 18 Oct 2010 13:47:21 +0100
parents 210a409e135a 84fd4bb8d656
children 61111a6a229f d70890996156
comparison
equal deleted inserted replaced
376:210a409e135a 379:3d1c69b2215e
322 } 322 }
323 323
324 QDesktopWidget *desktop = QApplication::desktop(); 324 QDesktopWidget *desktop = QApplication::desktop();
325 QRect available = desktop->availableGeometry(); 325 QRect available = desktop->availableGeometry();
326 326
327 int width = available.width() * 2 / 3; 327 int width = (available.width() * 2) / 3;
328 int height = available.height() / 2; 328 int height = available.height() / 2;
329 if (height < 450) height = available.height() * 2 / 3; 329 if (height < 450) height = (available.height() * 2) / 3;
330 if (width > height * 2) width = height * 2; 330 if (width > height * 2) width = height * 2;
331 331
332 settings.beginGroup("MainWindow"); 332 settings.beginGroup("MainWindow");
333 QSize size = settings.value("size", QSize(width, height)).toSize(); 333 QSize size = settings.value("size", QSize(width, height)).toSize();
334 gui->resizeConstrained(size); 334 gui->resizeConstrained(size);