Move start/stop recording window and region to separate lines

This commit is contained in:
dec05eba
2026-01-27 18:18:25 +01:00
parent 03b4407d11
commit 3b2a09f8e1
2 changed files with 12 additions and 4 deletions

View File

@@ -64,6 +64,7 @@ namespace gsr {
std::unique_ptr<List> create_replay_partial_save_hotkey_options();
std::unique_ptr<List> create_record_hotkey_options();
std::unique_ptr<List> create_record_hotkey_window_region_options();
std::unique_ptr<List> create_record_hotkey_window_options();
std::unique_ptr<List> create_stream_hotkey_options();
std::unique_ptr<List> create_screenshot_hotkey_options();
std::unique_ptr<List> create_screenshot_region_hotkey_options();

View File

@@ -313,6 +313,16 @@ namespace gsr {
start_stop_recording_region_button_ptr = start_stop_recording_region_button.get();
list->add_widget(std::move(start_stop_recording_region_button));
start_stop_recording_region_button_ptr->on_click = [this] {
configure_hotkey_start(ConfigureHotkeyType::RECORD_START_STOP_REGION);
};
return list;
}
std::unique_ptr<List> GlobalSettingsPage::create_record_hotkey_window_options() {
auto list = std::make_unique<List>(List::Orientation::HORIZONTAL, List::Alignment::CENTER);
char str[128];
if(gsr_info->system_info.display_server == DisplayServer::X11)
snprintf(str, sizeof(str), TR("Start/stop recording a window:"));
@@ -324,10 +334,6 @@ namespace gsr {
start_stop_recording_window_button_ptr = start_stop_recording_window_button.get();
list->add_widget(std::move(start_stop_recording_window_button));
start_stop_recording_region_button_ptr->on_click = [this] {
configure_hotkey_start(ConfigureHotkeyType::RECORD_START_STOP_REGION);
};
start_stop_recording_window_button_ptr->on_click = [this] {
configure_hotkey_start(ConfigureHotkeyType::RECORD_START_STOP_WINDOW);
};
@@ -448,6 +454,7 @@ namespace gsr {
list_ptr->add_widget(create_replay_partial_save_hotkey_options());
list_ptr->add_widget(create_record_hotkey_options());
list_ptr->add_widget(create_record_hotkey_window_region_options());
list_ptr->add_widget(create_record_hotkey_window_options());
list_ptr->add_widget(create_stream_hotkey_options());
list_ptr->add_widget(create_screenshot_hotkey_options());
list_ptr->add_widget(create_screenshot_region_hotkey_options());