mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-16 09:29:55 +00:00
UI Nits: Geometry and setUnifiedTitleAndToolBar
The restore / set geometry for the config dialog and mainwindow was 'adjusted' by setUnifiedTitleAndToolBarOnMac. This meant that when restoring geometry at startup the window would gradually decrease in size (by roughly 42 pixels).
This commit is contained in:
@@ -149,6 +149,13 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
// need to restore geometry before setUnifiedToolBar.. on Mac
|
||||
appsettings->setValue(GC_SETTINGS_LAST, home.dirName());
|
||||
QVariant geom = appsettings->value(this, GC_SETTINGS_MAIN_GEOM);
|
||||
if (geom == QVariant()) resize(640, 480);
|
||||
else setGeometry(geom.toRect());
|
||||
|
||||
|
||||
#ifdef Q_OS_MAC // MAC NATIVE TOOLBAR
|
||||
static CocoaInitializer cocoaInitializer; // we only need one
|
||||
setUnifiedTitleAndToolBarOnMac(true);
|
||||
@@ -238,11 +245,6 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
setContentsMargins(0,0,0,0);
|
||||
setAcceptDrops(true);
|
||||
|
||||
appsettings->setValue(GC_SETTINGS_LAST, home.dirName());
|
||||
QVariant geom = appsettings->value(this, GC_SETTINGS_MAIN_GEOM);
|
||||
if (geom == QVariant()) resize(640, 480);
|
||||
else setGeometry(geom.toRect());
|
||||
|
||||
GCColor *GCColorSet = new GCColor(this); // get/keep colorset
|
||||
GCColorSet->colorSet(); // shut up the compiler
|
||||
|
||||
|
||||
Reference in New Issue
Block a user