|
9 | 9 | #include "misc/eventfilter.h" |
10 | 10 | #include "dialog/firstlaunchwizard.h" |
11 | 11 |
|
| 12 | +#include <phantomstyle.h> |
12 | 13 | #include <Animation/Animation.h> |
13 | 14 |
|
14 | 15 | #include <QMenu> |
@@ -54,8 +55,6 @@ MainWindow::MainWindow(QString exepath, bool statupInTray, bool allowMultipleIns |
54 | 55 | conf->setConfigMap(readConfig()); |
55 | 56 | LoadConfig(); |
56 | 57 |
|
57 | | - |
58 | | - |
59 | 58 | conv_dlg = new ConvolverDlg(this,this); |
60 | 59 | preset_dlg = new PresetDlg(this); |
61 | 60 |
|
@@ -167,6 +166,8 @@ MainWindow::MainWindow(QString exepath, bool statupInTray, bool allowMultipleIns |
167 | 166 | LaunchFirstRunSetup(); |
168 | 167 | else |
169 | 168 | RunDiagnosticChecks(); |
| 169 | + |
| 170 | + //setStyle(new PhantomStyle); |
170 | 171 | } |
171 | 172 |
|
172 | 173 | MainWindow::~MainWindow() |
@@ -254,12 +255,15 @@ void MainWindow::InitializeSpectrum(){ |
254 | 255 | else if(refresh > 500) refresh = 500; |
255 | 256 | m_audioengine->setNotifyIntervalMs(refresh); |
256 | 257 |
|
257 | | - analysisLayout.reset(new QHBoxLayout()); |
258 | | - analysisLayout->addWidget(m_spectrograph); |
| 258 | + analysisLayout.reset(new QFrame()); |
| 259 | + analysisLayout->setFrameShape(QFrame::Shape::StyledPanel); |
| 260 | + analysisLayout->setLayout(new QHBoxLayout); |
| 261 | + analysisLayout->layout()->setMargin(0); |
| 262 | + analysisLayout->layout()->addWidget(m_spectrograph); |
259 | 263 | m_spectrograph->hide(); |
260 | 264 |
|
261 | 265 | auto buttonbox = ui->centralWidget->layout()->takeAt(ui->centralWidget->layout()->count()-1); |
262 | | - ui->centralWidget->layout()->addItem(analysisLayout.data()); |
| 266 | + ui->centralWidget->layout()->addWidget(analysisLayout.data()); |
263 | 267 | ui->centralWidget->layout()->addItem(buttonbox); |
264 | 268 | analysisLayout.take(); |
265 | 269 |
|
@@ -299,10 +303,22 @@ void MainWindow::RefreshSpectrumParameters(){ |
299 | 303 |
|
300 | 304 | if(maxfreq < minfreq) maxfreq = minfreq + 100; |
301 | 305 |
|
| 306 | + QColor outline; |
| 307 | + if (palette().window().style() == Qt::TexturePattern) |
| 308 | + outline = QColor(0, 0, 0, 160); |
| 309 | + else |
| 310 | + outline = palette().window().color().lighter(140); |
| 311 | + |
302 | 312 | if(m_appwrapper->getSpectrumTheme() == 0) |
303 | | - m_spectrograph->setTheme(Qt::black,QColor(51,204,201),QColor(255,255,0),m_appwrapper->getSpetrumGrid()); |
| 313 | + m_spectrograph->setTheme(Qt::black,QColor(51,204,201),QColor(51,204,201).darker(),QColor(255,255,0),m_appwrapper->getSpetrumGrid()); |
304 | 314 | else |
305 | | - m_spectrograph->setTheme(palette().window().color().lighter(),palette().highlight().color(),palette().text().color(),m_appwrapper->getSpetrumGrid()); |
| 315 | + m_spectrograph->setTheme(palette().window().color().lighter(), |
| 316 | + palette().highlight().color(), |
| 317 | + palette().text().color(), |
| 318 | + outline.lighter(108), |
| 319 | + m_appwrapper->getSpetrumGrid()); |
| 320 | + |
| 321 | + |
306 | 322 |
|
307 | 323 | m_spectrograph->setParams(bands, minfreq, maxfreq); |
308 | 324 | m_audioengine->setNotifyIntervalMs(refresh); |
|
0 commit comments