# HG changeset patch # User Chris Cannam # Date 1431614437 -3600 # Node ID 80c5d98399ece5039176e20f316e9c420883e9b6 # Parent 728343b946224fe73882b68b165c122f9f28f754# Parent e33415cc9b347b6a11c726cd8b5b40aaf2172eae Merge from branch scalable-icons diff -r e33415cc9b34 -r 80c5d98399ec .hgsubstate --- a/.hgsubstate Wed May 13 14:06:34 2015 +0100 +++ b/.hgsubstate Thu May 14 15:40:37 2015 +0100 @@ -2,5 +2,5 @@ 86c2b244b1add672b566b96a79879ae2a1e55b99 icons/scalable 55ece8862b6d3a54aad271a53f9c1615e5d3bcf8 sv-dependency-builds 549f772160484927754b245436281bfcb401468e svapp -32ab6c48efaa23d24a67315bccdc27f3ba1a18d5 svcore -c91878670297fa9e04835f852c84f1b7db592343 svgui +f4ad0bfceeb7cc40ab00ecc97883ac02d123a6fd svcore +9b4771ba2e3e749e1dcee1cc544f8fa570c371f0 svgui diff -r e33415cc9b34 -r 80c5d98399ec main/MainWindow.cpp --- a/main/MainWindow.cpp Wed May 13 14:06:34 2015 +0100 +++ b/main/MainWindow.cpp Thu May 14 15:40:37 2015 +0100 @@ -4590,7 +4590,7 @@ #endif aboutText += - "

Sonic Visualiser Copyright © 2005–2013 Chris Cannam and " + "

Sonic Visualiser Copyright © 2005–2015 Chris Cannam and " "Queen Mary, University of London.

" "

This program is free software; you can redistribute it and/or " "modify it under the terms of the GNU General Public License as " diff -r e33415cc9b34 -r 80c5d98399ec main/PreferencesDialog.cpp --- a/main/PreferencesDialog.cpp Wed May 13 14:06:34 2015 +0100 +++ b/main/PreferencesDialog.cpp Thu May 14 15:40:37 2015 +0100 @@ -223,6 +223,15 @@ settings.beginGroup("Preferences"); +#ifdef Q_OS_MAC + m_retina = settings.value("scaledHiDpi", true).toBool(); + QCheckBox *retina = new QCheckBox; + retina->setCheckState(m_retina ? Qt::Checked : Qt::Unchecked); + connect(retina, SIGNAL(stateChanged(int)), this, SLOT(retinaChanged(int))); +#else + m_retina = false; +#endif + QString userLocale = settings.value("locale", "").toString(); m_currentLocale = userLocale; @@ -353,6 +362,13 @@ row, 0); subgrid->addWidget(showSplash, row++, 1, 1, 1); +#ifdef Q_OS_MAC + if (devicePixelRatio() > 1) { + subgrid->addWidget(new QLabel(tr("Draw layers at Retina resolution:")), row, 0); + subgrid->addWidget(retina, row++, 1, 1, 1); + } +#endif + subgrid->addWidget(new QLabel(tr("%1:").arg(prefs->getPropertyLabel ("Property Box Layout"))), row, 0); @@ -564,6 +580,14 @@ } void +PreferencesDialog::retinaChanged(int state) +{ + m_retina = (state == Qt::Checked); + m_applyButton->setEnabled(true); + // Does not require a restart +} + +void PreferencesDialog::showSplashChanged(int state) { m_showSplash = (state == Qt::Checked); @@ -680,6 +704,9 @@ settings.setValue(permishTag, m_networkPermission); settings.setValue("audio-target", devices[m_audioDevice]); settings.setValue("locale", m_currentLocale); +#ifdef Q_OS_MAC + settings.setValue("scaledHiDpi", m_retina); +#endif settings.endGroup(); settings.beginGroup("MainWindow"); diff -r e33415cc9b34 -r 80c5d98399ec main/PreferencesDialog.h --- a/main/PreferencesDialog.h Wed May 13 14:06:34 2015 +0100 +++ b/main/PreferencesDialog.h Thu May 14 15:40:37 2015 +0100 @@ -64,6 +64,7 @@ void defaultTemplateChanged(int); void localeChanged(int); void networkPermissionChanged(int state); + void retinaChanged(int state); void tempDirButtonClicked(); @@ -95,6 +96,7 @@ int m_resampleQuality; bool m_resampleOnLoad; bool m_networkPermission; + bool m_retina; QString m_tempDirRoot; int m_backgroundMode; int m_timeToTextMode;