@@ -271,11 +271,15 @@ namespace {
271271 ImGui::Begin (" libvirtualhid control" , nullptr , window_flags);
272272
273273 const auto backend = backend_text (*runtime_);
274- ImGui::TextUnformatted ( backend.c_str ());
274+ ImGui::TextWrapped ( " %s " , backend.c_str ());
275275 ImGui::Separator ();
276276
277- if (ImGui::BeginTable (" control-layout" , 2 , ImGuiTableFlags_Resizable | ImGuiTableFlags_BordersInnerV)) {
278- ImGui::TableSetupColumn (" Devices" , ImGuiTableColumnFlags_WidthFixed, 330 .0F );
277+ if (ImGui::GetContentRegionAvail ().x < 760 .0F ) {
278+ render_device_panel (devices);
279+ ImGui::Separator ();
280+ render_control_panel (selected);
281+ } else if (ImGui::BeginTable (" control-layout" , 2 , ImGuiTableFlags_Resizable | ImGuiTableFlags_BordersInnerV)) {
282+ ImGui::TableSetupColumn (" Devices" , ImGuiTableColumnFlags_WidthFixed, 220 .0F );
279283 ImGui::TableSetupColumn (" Controls" , ImGuiTableColumnFlags_WidthStretch);
280284 ImGui::TableNextRow ();
281285
@@ -459,7 +463,8 @@ namespace {
459463 button_active_.fill (false );
460464 }
461465
462- if (ImGui::BeginTable (" buttons" , 4 , ImGuiTableFlags_SizingStretchSame)) {
466+ const auto column_count = ImGui::GetContentRegionAvail ().x < 480 .0F ? 3 : 4 ;
467+ if (ImGui::BeginTable (" buttons" , column_count, ImGuiTableFlags_SizingStretchSame)) {
463468 for (std::size_t index = 0 ; index < button_choices.size (); ++index) {
464469 if (!visible_buttons[index]) {
465470 continue ;
@@ -955,9 +960,9 @@ namespace {
955960 main_scale = 1 .0F ;
956961 }
957962
958- constexpr auto base_width = 1120 ;
963+ constexpr auto base_width = 860 ;
959964 constexpr auto base_height = 760 ;
960- constexpr auto minimum_width = 980 ;
965+ constexpr auto minimum_width = 600 ;
961966 constexpr auto minimum_height = 700 ;
962967 const auto window_flags = SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN | SDL_WINDOW_HIGH_PIXEL_DENSITY ;
963968 auto *window = SDL_CreateWindow (
0 commit comments