mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-24 06:14:54 +00:00
WiiSpeakWindow: Don't hide QGroupBox
This commit is contained in:
parent
f95a357cb5
commit
a9f712c80b
2 changed files with 8 additions and 7 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <QComboBox>
|
||||
#include <QGroupBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QString>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
|
@ -38,6 +39,10 @@ WiiSpeakWindow::~WiiSpeakWindow() = default;
|
|||
void WiiSpeakWindow::CreateMainWindow()
|
||||
{
|
||||
auto* main_layout = new QVBoxLayout();
|
||||
auto* label = new QLabel();
|
||||
label->setText(QStringLiteral("<center><i>%1</i></center>")
|
||||
.arg(tr("Some settings cannot be changed when emulation is running.")));
|
||||
main_layout->addWidget(label);
|
||||
|
||||
auto* checkbox_group = new QGroupBox();
|
||||
auto* checkbox_layout = new QHBoxLayout();
|
||||
|
@ -49,7 +54,7 @@ void WiiSpeakWindow::CreateMainWindow()
|
|||
checkbox_group->setLayout(checkbox_layout);
|
||||
main_layout->addWidget(checkbox_group);
|
||||
|
||||
m_config_group = new QGroupBox(tr("Microphone Configuration"));
|
||||
auto* config_group = new QGroupBox(tr("Microphone Configuration"));
|
||||
auto* config_layout = new QHBoxLayout();
|
||||
|
||||
auto checkbox_mic_muted = new QCheckBox(tr("Mute"), this);
|
||||
|
@ -73,9 +78,8 @@ void WiiSpeakWindow::CreateMainWindow()
|
|||
m_combobox_microphones->setCurrentIndex(m_combobox_microphones->findData(current_device_id));
|
||||
config_layout->addWidget(m_combobox_microphones);
|
||||
|
||||
m_config_group->setLayout(config_layout);
|
||||
m_config_group->setVisible(Config::Get(Config::MAIN_EMULATE_WII_SPEAK));
|
||||
main_layout->addWidget(m_config_group);
|
||||
config_group->setLayout(config_layout);
|
||||
main_layout->addWidget(config_group);
|
||||
|
||||
setLayout(main_layout);
|
||||
}
|
||||
|
@ -83,7 +87,6 @@ void WiiSpeakWindow::CreateMainWindow()
|
|||
void WiiSpeakWindow::EmulateWiiSpeak(bool emulate)
|
||||
{
|
||||
Config::SetBaseOrCurrent(Config::MAIN_EMULATE_WII_SPEAK, emulate);
|
||||
m_config_group->setVisible(emulate);
|
||||
}
|
||||
|
||||
void WiiSpeakWindow::SetWiiSpeakConnectionState(bool muted)
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
class QCheckBox;
|
||||
class QComboBox;
|
||||
class QGroupBox;
|
||||
|
||||
class WiiSpeakWindow : public QWidget
|
||||
{
|
||||
|
@ -27,5 +26,4 @@ private:
|
|||
|
||||
QCheckBox* m_checkbox_enabled;
|
||||
QComboBox* m_combobox_microphones;
|
||||
QGroupBox* m_config_group;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue