comparison main/main.cpp @ 378:84fd4bb8d656

* Add misc/ directory from SVN repo
author Chris Cannam
date Mon, 18 Oct 2010 13:44:25 +0100
parents 3bb7eef5d45c
children 3d1c69b2215e
comparison
equal deleted inserted replaced
361:101f05420cba 378:84fd4bb8d656
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);