diff --git a/doc/img/MainWindow_spectrum_gui.png b/doc/img/MainWindow_spectrum_gui.png
index 73c8175bc..18b4da1b7 100644
Binary files a/doc/img/MainWindow_spectrum_gui.png and b/doc/img/MainWindow_spectrum_gui.png differ
diff --git a/doc/img/MainWindow_spectrum_gui.xcf b/doc/img/MainWindow_spectrum_gui.xcf
index 1f2358486..c0a8f49f1 100644
Binary files a/doc/img/MainWindow_spectrum_gui.xcf and b/doc/img/MainWindow_spectrum_gui.xcf differ
diff --git a/sdrgui/gui/glspectrumgui.cpp b/sdrgui/gui/glspectrumgui.cpp
index 914b0ade2..3997c29c3 100644
--- a/sdrgui/gui/glspectrumgui.cpp
+++ b/sdrgui/gui/glspectrumgui.cpp
@@ -19,6 +19,9 @@
// along with this program. If not, see . //
///////////////////////////////////////////////////////////////////////////////////
+#include
+#include
+
#include "gui/glspectrumgui.h"
#include "dsp/fftwindow.h"
#include "dsp/spectrumvis.h"
@@ -38,15 +41,18 @@ GLSpectrumGUI::GLSpectrumGUI(QWidget* parent) :
ui->setupUi(this);
on_linscale_toggled(false);
- ui->refLevel->clear();
- for(int ref = 0; ref >= -110; ref -= 5) {
- ui->refLevel->addItem(QString("%1").arg(ref));
- }
+ QString levelStyle = QString(
+ "QSpinBox {background-color: rgb(79, 79, 79);}"
+ "QLineEdit {color: white; background-color: rgb(79, 79, 79); border: 1px solid gray; border-radius: 4px;}"
+ "QTooltip {color: white; background-color: balck;}"
+ );
+ ui->refLevel->setStyleSheet(levelStyle);
+ ui->levelRange->setStyleSheet(levelStyle);
+ // ui->refLevel->findChild()->setStyleSheet("color: white; background-color: rgb(79, 79, 79); border: 1px solid gray; border-radius: 4px; ");
+ // ui->refLevel->setStyleSheet("background-color: rgb(79, 79, 79);");
- ui->levelRange->clear();
- for(int range = 100; range >= 5; range -= 5) {
- ui->levelRange->addItem(QString("%1").arg(range));
- }
+ // ui->levelRange->findChild()->setStyleSheet("color: white; background-color: rgb(79, 79, 79); border: 1px solid gray; border-radius: 4px;");
+ // ui->levelRange->setStyleSheet("background-color: rgb(79, 79, 79);");
connect(&m_messageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
@@ -101,8 +107,8 @@ bool GLSpectrumGUI::deserialize(const QByteArray& data)
void GLSpectrumGUI::displaySettings()
{
blockApplySettings(true);
- ui->refLevel->setCurrentIndex(-m_settings.m_refLevel / 5);
- ui->levelRange->setCurrentIndex((100 - m_settings.m_powerRange) / 5);
+ ui->refLevel->setValue(m_settings.m_refLevel);
+ ui->levelRange->setValue(m_settings.m_powerRange);
ui->decay->setSliderPosition(m_settings.m_decay);
ui->decayDivisor->setSliderPosition(m_settings.m_decayDivisor);
ui->stroke->setSliderPosition(m_settings.m_histogramStroke);
@@ -252,15 +258,15 @@ void GLSpectrumGUI::on_wsSpectrum_toggled(bool checked)
}
}
-void GLSpectrumGUI::on_refLevel_currentIndexChanged(int index)
+void GLSpectrumGUI::on_refLevel_valueChanged(int value)
{
- m_settings.m_refLevel = 0 - index * 5;
+ m_settings.m_refLevel = value;
applySettings();
}
-void GLSpectrumGUI::on_levelRange_currentIndexChanged(int index)
+void GLSpectrumGUI::on_levelRange_valueChanged(int value)
{
- m_settings.m_powerRange = 100 - index * 5;
+ m_settings.m_powerRange = value;
applySettings();
}
diff --git a/sdrgui/gui/glspectrumgui.h b/sdrgui/gui/glspectrumgui.h
index 0954d630c..9d324b287 100644
--- a/sdrgui/gui/glspectrumgui.h
+++ b/sdrgui/gui/glspectrumgui.h
@@ -84,8 +84,8 @@ private:
private slots:
void on_fftWindow_currentIndexChanged(int index);
void on_fftSize_currentIndexChanged(int index);
- void on_refLevel_currentIndexChanged(int index);
- void on_levelRange_currentIndexChanged(int index);
+ void on_refLevel_valueChanged(int value);
+ void on_levelRange_valueChanged(int value);
void on_decay_valueChanged(int index);
void on_decayDivisor_valueChanged(int index);
void on_stroke_valueChanged(int index);
diff --git a/sdrgui/gui/glspectrumgui.ui b/sdrgui/gui/glspectrumgui.ui
index 4f098600b..08b5b9857 100644
--- a/sdrgui/gui/glspectrumgui.ui
+++ b/sdrgui/gui/glspectrumgui.ui
@@ -453,17 +453,11 @@
-
-
-
-
- 0
- 0
-
-
+
50
- 0
+ 24
@@ -475,38 +469,23 @@
Reference level (dB)
-
- QComboBox::AdjustToContents
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ -110
+
+
+ 0
-
-
-
- 0
-
-
- -
-
- -5
-
-
- -
-
- -10
-
-
-
-
-
-
- 0
- 0
-
-
+
45
- 0
+ 24
@@ -518,24 +497,15 @@
Range (dB)
-
- QComboBox::AdjustToContents
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+ 1
+
+
+ 100
-
-
-
- 100
-
-
- -
-
- 50
-
-
- -
-
- 5
-
-
-
diff --git a/sdrgui/readme.md b/sdrgui/readme.md
index 44e16eeb9..7f87e87ff 100644
--- a/sdrgui/readme.md
+++ b/sdrgui/readme.md
@@ -378,11 +378,11 @@ Select the size of the FFT window among these values:
4.3. Reference level
-This is the level in dB at the top of the display range. You can select values between 0 and -110 in 5 dB steps
+This is the level in dB at the top of the display range. You can select values between 0 and -110 in 1 dB steps
4.4. Range
-This is the range of display in dB. You can select values between 5 and 100 in 5 dB steps
+This is the range of display in dB. You can select values between 1 and 100 in 1 dB steps
4.5. Averaging mode