diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 5e06c38..826e40a 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -456,6 +456,11 @@ void AppFrame::OnMenu(wxCommandEvent& event) { ThemeMgr::mgr.setTheme(COLOR_THEME_RADAR); } + if (event.GetId() >= wxID_THEME_DEFAULT && event.GetId() <= wxID_THEME_RADAR) { + demodTuner->Refresh(); + demodModeSelector->Refresh(); + } + switch (event.GetId()) { case wxID_BANDWIDTH_250K: wxGetApp().setSampleRate(250000); diff --git a/src/panel/WaterfallPanel.cpp b/src/panel/WaterfallPanel.cpp index b018736..d3b0224 100644 --- a/src/panel/WaterfallPanel.cpp +++ b/src/panel/WaterfallPanel.cpp @@ -1,6 +1,7 @@ #include "WaterfallPanel.h" WaterfallPanel::WaterfallPanel() : GLPanel(), fft_size(0), waterfall_lines(0), waterfall_slice(NULL), activeTheme(NULL) { + setFillColor(RGB3f(0,0,0)); for (int i = 0; i < 2; i++) { waterfall[i] = 0; } @@ -106,7 +107,7 @@ void WaterfallPanel::drawPanelContents() { if (!waterfall[0]) { return; } - + int half_fft_size = fft_size / 2; glLoadMatrixf(transform); @@ -160,4 +161,4 @@ void WaterfallPanel::drawPanelContents() { glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glDisable(GL_TEXTURE_2D); -} \ No newline at end of file +} diff --git a/src/panel/WaterfallPanel.h b/src/panel/WaterfallPanel.h index 3d44d6b..65c664a 100644 --- a/src/panel/WaterfallPanel.h +++ b/src/panel/WaterfallPanel.h @@ -9,14 +9,13 @@ public: void refreshTheme(); void setPoints(std::vector &points); void step(); - - std::vector points; - bool needsUpdate; protected: void drawPanelContents(); private: + std::vector points; + GLuint waterfall[2]; int waterfall_ofs[2]; int fft_size; @@ -24,4 +23,4 @@ private: unsigned char *waterfall_slice; ColorTheme *activeTheme; -}; \ No newline at end of file +}; diff --git a/src/visual/WaterfallCanvas.cpp b/src/visual/WaterfallCanvas.cpp index 3f13d9b..a5269e2 100644 --- a/src/visual/WaterfallCanvas.cpp +++ b/src/visual/WaterfallCanvas.cpp @@ -710,4 +710,4 @@ void WaterfallCanvas::OnMouseRightReleased(wxMouseEvent& event) { SpectrumVisualDataQueue *WaterfallCanvas::getVisualDataQueue() { return &visualDataQueue; -} \ No newline at end of file +}