mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-12-23 19:15:40 -05:00
theme refresh fix, set waterfall panel bg
This commit is contained in:
parent
c60a5aa019
commit
c4cde423f9
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
@ -710,4 +710,4 @@ void WaterfallCanvas::OnMouseRightReleased(wxMouseEvent& event) {
|
||||
|
||||
SpectrumVisualDataQueue *WaterfallCanvas::getVisualDataQueue() {
|
||||
return &visualDataQueue;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user