Skip to content

Commit

Permalink
Rearrange Level area to reduce number of columns required for short w…
Browse files Browse the repository at this point in the history
…indows.
  • Loading branch information
tmiw committed Nov 30, 2023
1 parent 6fe10f1 commit 83bb414
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions src/topFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,10 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
#endif // wxUSE_ACCESSIBILITY

this->SetSizeHints(wxDefaultSize, wxDefaultSize);
//this->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
//this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));

//=====================================================
// Menubar Setup
//=====================================================
m_menubarMain = new wxMenuBar(wxMB_DOCKABLE);
file = new wxMenu();

Expand Down Expand Up @@ -442,6 +442,23 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const

leftSizer->Add(snrSizer, 2, wxEXPAND|wxALL, 2);

//------------------------------
// Signal Level(vert. bargraph)
//------------------------------
wxStaticBoxSizer* levelSizer;
wxStaticBox* levelBox = new wxStaticBox(m_panel, wxID_ANY, _("Level"));
levelSizer = new wxStaticBoxSizer(levelBox, wxVERTICAL);

m_textLevel = new wxStaticText(levelBox, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(100,-1), wxALIGN_CENTRE);
m_textLevel->SetForegroundColour(wxColour(255,0,0));
levelSizer->Add(m_textLevel, 0, wxALIGN_CENTER_HORIZONTAL, 1);

m_gaugeLevel = new wxGauge(levelBox, wxID_ANY, 100, wxDefaultPosition, wxSize(135,15), wxGA_SMOOTH);
m_gaugeLevel->SetToolTip(_("Peak of From Radio in Rx, or peak of From Mic in Tx mode. If Red you should reduce your levels"));
levelSizer->Add(m_gaugeLevel, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);

leftSizer->Add(levelSizer, 2, wxALL|wxEXPAND, 2);

//------------------------------
// Sync Indicator box
//------------------------------
Expand Down Expand Up @@ -505,23 +522,6 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const

leftSizer->Add(sbSizer_ber,0, wxALL|wxEXPAND, 2);

//------------------------------
// Signal Level(vert. bargraph)
//------------------------------
wxStaticBoxSizer* levelSizer;
wxStaticBox* levelBox = new wxStaticBox(m_panel, wxID_ANY, _("Level"));
levelSizer = new wxStaticBoxSizer(levelBox, wxVERTICAL);

m_textLevel = new wxStaticText(levelBox, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(100,-1), wxALIGN_CENTRE);
m_textLevel->SetForegroundColour(wxColour(255,0,0));
levelSizer->Add(m_textLevel, 0, wxALIGN_CENTER_HORIZONTAL, 1);

m_gaugeLevel = new wxGauge(levelBox, wxID_ANY, 100, wxDefaultPosition, wxSize(135,15), wxGA_SMOOTH);
m_gaugeLevel->SetToolTip(_("Peak of From Radio in Rx, or peak of From Mic in Tx mode. If Red you should reduce your levels"));
levelSizer->Add(m_gaugeLevel, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10);

leftSizer->Add(levelSizer, 2, wxALL|wxEXPAND, 2);

//------------------------------
// Help button: goes to Help page on website
//------------------------------
Expand All @@ -531,6 +531,7 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_btnHelp = new wxButton(helpBox, wxID_ANY, _("Get Help"), wxDefaultPosition, wxDefaultSize, 0);
m_btnHelp->SetToolTip(_("Get help with FreeDV."));
helpSizer->Add(m_btnHelp, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
leftSizer->SetMinSize(wxSize(-1, 375));
leftOuterSizer->Add(leftSizer, 2, wxALL | wxEXPAND, 1);
leftOuterSizer->Add(helpSizer, 0, wxFIXED_MINSIZE | wxALL | wxEXPAND, 1);

Expand Down

0 comments on commit 83bb414

Please sign in to comment.