theme refresh fix, set waterfall panel bg

This commit is contained in:
Charles J. Cliffe 2015-08-10 18:45:46 -04:00
parent c60a5aa019
commit c4cde423f9
4 changed files with 12 additions and 7 deletions

View File

@ -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);

View File

@ -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);
}
}

View File

@ -9,14 +9,13 @@ public:
void refreshTheme();
void setPoints(std::vector<float> &points);
void step();
std::vector<float> points;
bool needsUpdate;
protected:
void drawPanelContents();
private:
std::vector<float> points;
GLuint waterfall[2];
int waterfall_ofs[2];
int fft_size;
@ -24,4 +23,4 @@ private:
unsigned char *waterfall_slice;
ColorTheme *activeTheme;
};
};

View File

@ -710,4 +710,4 @@ void WaterfallCanvas::OnMouseRightReleased(wxMouseEvent& event) {
SpectrumVisualDataQueue *WaterfallCanvas::getVisualDataQueue() {
return &visualDataQueue;
}
}