Copy Config from gpu-screen-recorder-gtk, make it more modern and efficient with string_view and variant, use string_view in gsr info parsing

This commit is contained in:
dec05eba
2024-08-06 05:57:21 +02:00
parent b778fd7cc6
commit 9f1fddc47c
10 changed files with 505 additions and 77 deletions

View File

@@ -253,7 +253,7 @@ static void add_widgets_to_settings_page(mgl::vec2i window_size, mgl::vec2f sett
auto audio_device_list = std::make_unique<gsr::List>(gsr::List::Orientation::HORIZONTAL, gsr::List::Alignment::CENTER);
gsr::List *audio_device_list_ptr = audio_device_list.get();
{
audio_device_list->add_widget(std::make_unique<gsr::Label>(&gsr::get_theme().body_font, "*", gsr::get_theme().text_color));
audio_device_list->add_widget(std::make_unique<gsr::Label>(&gsr::get_theme().body_font, " ", gsr::get_theme().text_color));
auto audio_device_box = std::make_unique<gsr::ComboBox>(&gsr::get_theme().body_font);
for(const auto &audio_device : audio_devices) {
audio_device_box->add_item(audio_device.description, audio_device.name);