diff --git a/client/render/ui_widgets.cpp b/client/render/ui_widgets.cpp index 5c1af682..dc300cb7 100644 --- a/client/render/ui_widgets.cpp +++ b/client/render/ui_widgets.cpp @@ -194,17 +194,11 @@ float setting_label(const std::string & title, const std::string & description, { ImGui::PushFont(nullptr, style.FontSizeBase * metrics::font_description); ImGui::PushStyleColor(ImGuiCol_Text, t.text_muted); - // single line, capped at half the row width and ellipsized so it never wraps or crowds the control + // never wider than half the row; wrap to as many lines as needed so it shows in full const float desc_w = ImMin(text_w, avail * 0.5f); - std::string text = description; - if (ImGui::CalcTextSize(text.c_str()).x > desc_w) - { - const float ell_w = ImGui::CalcTextSize("...").x; - while (not text.empty() and ImGui::CalcTextSize(text.c_str()).x + ell_w > desc_w) - text.pop_back(); - text += "..."; - } - ImGui::TextUnformatted(text.c_str()); + ImGui::PushTextWrapPos(start.x + desc_w); + ImGui::TextUnformatted(description.c_str()); + ImGui::PopTextWrapPos(); ImGui::PopStyleColor(); ImGui::PopFont(); } diff --git a/client/scenes/gui_settings.cpp b/client/scenes/gui_settings.cpp index 3e8c14fe..c1772de7 100644 --- a/client/scenes/gui_settings.cpp +++ b/client/scenes/gui_settings.cpp @@ -202,7 +202,7 @@ void settings_performance(const settings_context & ctx) list.push_back({ .id = "##refresh", .label = _("Refresh rate"), - .description = _("Select refresh rate based on measured application performance.\nMay cause flicker when a change happens."), + .description = _("Select refresh rate based on measured application performance. May cause flicker when a change happens."), .ui = ui_kind::segmented, .get_int = [&config, rates] { for (size_t i = 0; i < rates.size(); ++i) @@ -430,7 +430,7 @@ void settings_streaming(const settings_context & ctx) list.push_back({ .id = "##stream_gui", .label = _("In-stream window"), - .description = _("Enables the configuration window to be shown while the game is streaming.\nIf enabled, the window is activated by pressing both thumbsticks."), + .description = _("Enables the configuration window to be shown while the game is streaming. If enabled, the window is activated by pressing both thumbsticks."), .ui = ui_kind::toggle, .get_bool = [&config] { return config.enable_stream_gui; }, .set_bool = [&config](bool v) { config.enable_stream_gui = v; config.save(); }, @@ -487,8 +487,8 @@ void settings_post_processing(const settings_context & ctx) }); }; - flag_combo("##supersampling", _("Supersampling"), _("Reduce flicker for high contrast edges.\nUseful when the input resolution is high compared to the headset display."), {0, XR_COMPOSITION_LAYER_SETTINGS_NORMAL_SUPER_SAMPLING_BIT_FB, XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SUPER_SAMPLING_BIT_FB}, &configuration::openxr_post_processing_settings::super_sampling); - flag_combo("##sharpening", _("Sharpening"), _("Improve clarity of high contrast edges and counteract blur.\nUseful when the input resolution is low compared to the headset display."), {0, XR_COMPOSITION_LAYER_SETTINGS_NORMAL_SHARPENING_BIT_FB, XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SHARPENING_BIT_FB}, &configuration::openxr_post_processing_settings::sharpening); + flag_combo("##supersampling", _("Supersampling"), _("Reduce flicker for high contrast edges. Useful when the input resolution is high compared to the headset display."), {0, XR_COMPOSITION_LAYER_SETTINGS_NORMAL_SUPER_SAMPLING_BIT_FB, XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SUPER_SAMPLING_BIT_FB}, &configuration::openxr_post_processing_settings::super_sampling); + flag_combo("##sharpening", _("Sharpening"), _("Improve clarity of high contrast edges and counteract blur. Useful when the input resolution is low compared to the headset display."), {0, XR_COMPOSITION_LAYER_SETTINGS_NORMAL_SHARPENING_BIT_FB, XR_COMPOSITION_LAYER_SETTINGS_QUALITY_SHARPENING_BIT_FB}, &configuration::openxr_post_processing_settings::sharpening); } ui::page_header(_S("Post-processing"), _S("OpenXR layer supersampling and sharpening.")); diff --git a/client/scenes/lobby_gui.cpp b/client/scenes/lobby_gui.cpp index 80df80ee..42dafbea 100644 --- a/client/scenes/lobby_gui.cpp +++ b/client/scenes/lobby_gui.cpp @@ -1146,13 +1146,22 @@ std::vector> scenes::lobby::draw_gui(XrTi wivrn::ui::top_bar(TopBarH, about_picture, top_items); - // content area, with an equal margin on both sides of the panel + // content area: content_margin from the sidebar on the left; the panel runs all the way + // to the window's right edge so the scrollbar sits at the edge (no margin beside it). const float content_margin = wivrn::ui::metrics::content_margin; ImGui::SetCursorPos({TabWidth + content_margin, TopBarH}); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10); - ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, {20, 20}); - ImGui::BeginChild("Main", ImVec2(ImGui::GetWindowSize().x - ImGui::GetCursorPosX() - content_margin, 0), 0); + ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, {content_margin, 20}); + ImGui::BeginChild("Main", ImVec2(ImGui::GetWindowSize().x - ImGui::GetCursorPosX(), 0), 0); + + // The scrollbar is wide (30px); WindowPadding alone leaves the content cramped against it. + // Pull the work area in on the right so the content keeps a clear gap from the scrollbar. + { + ImGuiWindow * main_child = ImGui::GetCurrentWindow(); + main_child->WorkRect.Max.x -= content_margin; + main_child->ContentRegionRect.Max.x -= content_margin; + } ImGui::SetCursorPosY(20); switch (current_tab)