From 0fc409785a67be0b496c35bf624e80e6a3c8e22a Mon Sep 17 00:00:00 2001 From: David Salvisberg Date: Fri, 17 Jul 2015 17:36:01 +0200 Subject: [PATCH] Fixed alignment on native resolution checkbox description label. --- src/settingsmenu.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/settingsmenu.cpp b/src/settingsmenu.cpp index 705c911..4b78e2c 100644 --- a/src/settingsmenu.cpp +++ b/src/settingsmenu.cpp @@ -481,6 +481,17 @@ struct SettingsMenuPrivate return result; } + static inline void TextCentered(const char* str_id, const ImVec2 &size) + { + ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_WindowBg]); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImGui::GetStyle().Colors[ImGuiCol_WindowBg]); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImGui::GetStyle().Colors[ImGuiCol_WindowBg]); + ImGui::Button(str_id, size); + ImGui::PopStyleColor(); + ImGui::PopStyleColor(); + ImGui::PopStyleColor(); + } + void displayGraphicsTab() { if(ImGui::CollapsingHeader("Display Settings", 0, true, true)) @@ -514,7 +525,7 @@ struct SettingsMenuPrivate res[1] = 3*native[1]; } ImGui::SameLine(); - ImGui::Text("Recommended if no smooth upscaling."); + TextCentered("Recommended if no smooth upscaling.", ImVec2(0, 24)); ImGui::Checkbox("Start in fullscreen", &tempConfig.fullscreen); ImGui::SameLine(); ImGui::Checkbox("Keep aspect ratio", &tempConfig.fixedAspectRatio);