summaryrefslogtreecommitdiff
path: root/src/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/windows')
-rw-r--r--src/windows/voicesettingswindow.cpp20
-rw-r--r--src/windows/voicewindow.cpp40
2 files changed, 46 insertions, 14 deletions
diff --git a/src/windows/voicesettingswindow.cpp b/src/windows/voicesettingswindow.cpp
index 97f77b5..1a112f5 100644
--- a/src/windows/voicesettingswindow.cpp
+++ b/src/windows/voicesettingswindow.cpp
@@ -12,6 +12,7 @@
VoiceSettingsWindow::VoiceSettingsWindow()
: m_main(Gtk::ORIENTATION_VERTICAL) {
get_style_context()->add_class("app-window");
+ get_style_context()->add_class("voice-settings-window");
set_default_size(300, 300);
m_encoding_mode.append("Voice");
@@ -115,10 +116,21 @@ VoiceSettingsWindow::VoiceSettingsWindow()
m_signal_gain.emit(m_gain.get_value() / 100.0);
});
- m_main.add(m_encoding_mode);
- m_main.add(m_signal);
- m_main.add(m_bitrate);
- m_main.add(m_gain);
+ auto *layout = Gtk::make_managed<Gtk::HBox>();
+ auto *labels = Gtk::make_managed<Gtk::VBox>();
+ auto *widgets = Gtk::make_managed<Gtk::VBox>();
+ layout->pack_start(*labels, false, true, 5);
+ layout->pack_start(*widgets);
+ labels->pack_start(*Gtk::make_managed<Gtk::Label>("Coding Mode", Gtk::ALIGN_END));
+ labels->pack_start(*Gtk::make_managed<Gtk::Label>("Signal Hint", Gtk::ALIGN_END));
+ labels->pack_start(*Gtk::make_managed<Gtk::Label>("Bitrate", Gtk::ALIGN_END));
+ labels->pack_start(*Gtk::make_managed<Gtk::Label>("Gain", Gtk::ALIGN_END));
+ widgets->pack_start(m_encoding_mode);
+ widgets->pack_start(m_signal);
+ widgets->pack_start(m_bitrate);
+ widgets->pack_start(m_gain);
+
+ m_main.add(*layout);
add(m_main);
show_all_children();
diff --git a/src/windows/voicewindow.cpp b/src/windows/voicewindow.cpp
index 16a9fed..825681c 100644
--- a/src/windows/voicewindow.cpp
+++ b/src/windows/voicewindow.cpp
@@ -181,7 +181,7 @@ VoiceWindow::VoiceWindow(Snowflake channel_id)
m_mix_mono.set_active(audio.GetMixMono());
m_mix_mono.signal_toggled().connect([this]() {
- Abaddon::Get().GetAudio().SetMixMono(m_mix_mono.get_active());
+ Abaddon::Get().GetAudio().SetMixMono(m_mix_mono.get_active());
});
auto *playback_renderer = Gtk::make_managed<Gtk::CellRendererText>();
@@ -225,20 +225,40 @@ VoiceWindow::VoiceWindow(Snowflake channel_id)
window->show();
});
+ auto *sliders_container = Gtk::make_managed<Gtk::HBox>();
+ auto *sliders_labels = Gtk::make_managed<Gtk::VBox>();
+ auto *sliders_sliders = Gtk::make_managed<Gtk::VBox>();
+ sliders_container->pack_start(*sliders_labels, false, true, 2);
+ sliders_container->pack_start(*sliders_sliders);
+ sliders_labels->pack_start(*Gtk::make_managed<Gtk::Label>("Threshold", Gtk::ALIGN_END));
+ sliders_labels->pack_start(*Gtk::make_managed<Gtk::Label>("Gain", Gtk::ALIGN_END));
+ sliders_sliders->pack_start(m_vad_param);
+ sliders_sliders->pack_start(m_capture_gain);
+
+ auto *combos_container = Gtk::make_managed<Gtk::HBox>();
+ auto *combos_labels = Gtk::make_managed<Gtk::VBox>();
+ auto *combos_combos = Gtk::make_managed<Gtk::VBox>();
+ combos_container->pack_start(*combos_labels, false, true, 6);
+ combos_container->pack_start(*combos_combos, Gtk::PACK_EXPAND_WIDGET, 6);
+ combos_labels->pack_start(*Gtk::make_managed<Gtk::Label>("VAD Method", Gtk::ALIGN_END));
+ combos_labels->pack_start(*Gtk::make_managed<Gtk::Label>("Output Device", Gtk::ALIGN_END));
+ combos_labels->pack_start(*Gtk::make_managed<Gtk::Label>("Input Device", Gtk::ALIGN_END));
+ combos_combos->pack_start(m_vad_combo);
+ combos_combos->pack_start(m_playback_combo);
+ combos_combos->pack_start(m_capture_combo);
+
m_scroll.add(m_user_list);
m_controls.add(m_mute);
m_controls.add(m_deafen);
m_controls.add(m_noise_suppression);
m_controls.add(m_mix_mono);
- m_main.add(m_menu_bar);
- m_main.add(m_controls);
- m_main.add(m_vad_value);
- m_main.add(m_vad_param);
- m_main.add(m_capture_gain);
- m_main.add(m_scroll);
- m_main.add(m_vad_combo);
- m_main.add(m_playback_combo);
- m_main.add(m_capture_combo);
+ m_main.pack_start(m_menu_bar);
+ m_main.pack_start(m_controls);
+ m_main.pack_start(m_vad_value);
+ m_main.pack_start(*Gtk::make_managed<Gtk::Label>("Input Settings"));
+ m_main.pack_start(*sliders_container);
+ m_main.pack_start(m_scroll);
+ m_main.pack_start(*combos_container, Gtk::PACK_EXPAND_WIDGET, 2);
add(m_main);
show_all_children();