Skip to content

Commit

Permalink
Move label upward to conceal extra space on top of the popup.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiw committed Jul 13, 2024
1 parent 81b357f commit 09b7275
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/gui/dialogs/monitor_volume_adj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@ MonitorVolumeAdjPopup::MonitorVolumeAdjPopup( wxWindow* parent, ConfigurationDat
: wxPopupTransientWindow(parent)
, configVal_(configVal)
{
wxStaticBoxSizer* mainSizer = new wxStaticBoxSizer(wxVERTICAL, this);
wxStaticBoxSizer* mainSizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Monitor volume (dB)"));

wxStaticText* controlLabel = new wxStaticText(mainSizer->GetStaticBox(), wxID_ANY, wxT("Monitor volume (dB):"), wxDefaultPosition, wxDefaultSize, 0);
mainSizer->Add(controlLabel, 0, wxALL | wxEXPAND, 2);

volumeSlider_ = new wxSlider(mainSizer->GetStaticBox(), wxID_ANY, configVal, -40, 0, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS | wxSL_LABELS);
volumeSlider_ = new wxSlider(mainSizer->GetStaticBox(), wxID_ANY, configVal, -40, 0, wxDefaultPosition, wxSize(250, -1), wxSL_AUTOTICKS | wxSL_LABELS);
mainSizer->Add(volumeSlider_, 0, wxALL | wxEXPAND, 2);

SetSizerAndFit(mainSizer);
Expand All @@ -53,10 +50,10 @@ MonitorVolumeAdjPopup::MonitorVolumeAdjPopup( wxWindow* parent, ConfigurationDat

MonitorVolumeAdjPopup::~MonitorVolumeAdjPopup()
{
// TBD
volumeSlider_->Disconnect(wxEVT_SLIDER, wxCommandEventHandler(MonitorVolumeAdjPopup::OnSliderAdjusted), NULL, this);
}

void MonitorVolumeAdjPopup::OnSliderAdjusted(wxCommandEvent& event)
{
configVal_ = volumeSlider_->GetValue();
}
}

0 comments on commit 09b7275

Please sign in to comment.