Mercurial > hg > sonic-visualiser
changeset 969:80c5d98399ec osx-retina
Merge from branch scalable-icons
author | Chris Cannam |
---|---|
date | Thu, 14 May 2015 15:40:37 +0100 |
parents | 728343b94622 (diff) e33415cc9b34 (current diff) |
children | e27950e4ab4c |
files | .hgsubstate main/MainWindow.cpp |
diffstat | 4 files changed, 32 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 += - "<p><small>Sonic Visualiser Copyright © 2005–2013 Chris Cannam and " + "<p><small>Sonic Visualiser Copyright © 2005–2015 Chris Cannam and " "Queen Mary, University of London.</small></p>" "<p><small>This program is free software; you can redistribute it and/or " "modify it under the terms of the GNU General Public License as "
--- 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");
--- 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;