diff --git a/src/Application/Application_MainManager.cpp b/src/Application/Application_MainManager.cpp index e9861c6..0e70234 100644 --- a/src/Application/Application_MainManager.cpp +++ b/src/Application/Application_MainManager.cpp @@ -58,7 +58,7 @@ Application::drawManager() { if(ImGui::BeginChild("##ProfileInfo", {ImGui::GetContentRegionAvail().x * 0.60f, 0.0f}, - true, ImGuiWindowFlags_MenuBar)) + ImGuiChildFlags_Border, ImGuiWindowFlags_MenuBar)) { if(ImGui::BeginMenuBar()) { ImGui::TextUnformatted("Profile information"); @@ -85,7 +85,7 @@ Application::drawManager() { ImGui::SameLine(); if(ImGui::BeginChild("##MASSManager", {0.0f, 0.0f}, - true, ImGuiWindowFlags_MenuBar)) + ImGuiChildFlags_Border, ImGuiWindowFlags_MenuBar)) { if(ImGui::BeginMenuBar()) { ImGui::TextUnformatted("M.A.S.S. management"); diff --git a/src/Application/Application_MassViewer.cpp b/src/Application/Application_MassViewer.cpp index 6af7887..992a2ac 100644 --- a/src/Application/Application_MassViewer.cpp +++ b/src/Application/Application_MassViewer.cpp @@ -52,7 +52,7 @@ Application::drawMassViewer() { if(ImGui::BeginChild("##MassInfo", {0.0f, 0.0f}, - true, ImGuiWindowFlags_MenuBar)) + ImGuiChildFlags_Border, ImGuiWindowFlags_MenuBar)) { if(ImGui::BeginMenuBar()) { if(ImGui::BeginTable("##MassViewerMenuTable", 4)) { @@ -303,7 +303,9 @@ Application::drawCustomStyle(GameObjects::CustomStyle& style) { DCSResult return_value = DCS_Fail; - if(!ImGui::BeginChild("##CustomStyle", {0.0f, 244.0f}, true, ImGuiWindowFlags_MenuBar)) { + if(!ImGui::BeginChild("##CustomStyle", {}, ImGuiChildFlags_Border|ImGuiChildFlags_AutoResizeY, + ImGuiWindowFlags_MenuBar)) + { ImGui::EndChild(); return DCS_Fail; } diff --git a/src/Application/Application_MassViewer_Armour.cpp b/src/Application/Application_MassViewer_Armour.cpp index 769dcc3..98f6184 100644 --- a/src/Application/Application_MassViewer_Armour.cpp +++ b/src/Application/Application_MassViewer_Armour.cpp @@ -34,7 +34,7 @@ Application::drawArmour() { _currentMass->getBulletLauncherAttachments(); } - if(!ImGui::BeginChild("##ArmourParts", {0.0f, 0.0f}, true)) { + if(!ImGui::BeginChild("##ArmourParts", {}, ImGuiChildFlags_Border)) { ImGui::EndChild(); return; } diff --git a/src/Application/Application_MassViewer_Frame.cpp b/src/Application/Application_MassViewer_Frame.cpp index 445b561..d9a6c22 100644 --- a/src/Application/Application_MassViewer_Frame.cpp +++ b/src/Application/Application_MassViewer_Frame.cpp @@ -36,8 +36,8 @@ Application::drawFrameInfo() { if(ImGui::BeginChild("##JointSliders", {(ImGui::GetContentRegionAvail().x / 2.0f) - (ImGui::GetStyle().WindowPadding.x / 2.0f), - (ImGui::GetContentRegionAvail().y / 1.75f) - (ImGui::GetStyle().WindowPadding.y / 2.0f)}, - true, ImGuiWindowFlags_MenuBar)) + 0.0f}, + ImGuiChildFlags_Border|ImGuiChildFlags_AutoResizeY, ImGuiWindowFlags_MenuBar)) { if(ImGui::BeginMenuBar()) { ImGui::TextUnformatted("Joint sliders"); @@ -51,7 +51,7 @@ Application::drawFrameInfo() { if(ImGui::BeginChild("##FrameStyles", {(ImGui::GetContentRegionAvail().x / 2.0f) - (ImGui::GetStyle().WindowPadding.x / 2.0f), 0.0f}, - true, ImGuiWindowFlags_MenuBar)) + ImGuiChildFlags_Border, ImGuiWindowFlags_MenuBar)) { if(ImGui::BeginMenuBar()) { ImGui::TextUnformatted("Frame styles"); diff --git a/src/Application/Application_MassViewer_Weapons.cpp b/src/Application/Application_MassViewer_Weapons.cpp index 6f56390..98abf30 100644 --- a/src/Application/Application_MassViewer_Weapons.cpp +++ b/src/Application/Application_MassViewer_Weapons.cpp @@ -506,7 +506,7 @@ Application::drawWeaponEditor(GameObjects::Weapon& weapon) { } } - if(ImGui::BeginChild("##PartDetails", {0.0f, 0.0f}, true)) { + if(ImGui::BeginChild("##PartDetails", {}, ImGuiChildFlags_Border)) { ImGui::TextUnformatted("Styles:"); for(std::int32_t i = 0; i < 4; i++) { diff --git a/src/Application/Application_ProfileManager.cpp b/src/Application/Application_ProfileManager.cpp index 548a096..601b939 100644 --- a/src/Application/Application_ProfileManager.cpp +++ b/src/Application/Application_ProfileManager.cpp @@ -305,7 +305,7 @@ Application::drawBackupListPopup() { ImGui::EndTable(); } - ImGui::PushTextWrapPos(ImGui::GetWindowContentRegionWidth()); + ImGui::PushTextWrapPos(ImGui::GetContentRegionAvail().x); ImGui::TextUnformatted("Hover over a company name to see which files are included in the backup."); ImGui::PopTextWrapPos(); diff --git a/src/Application/Application_drawAbout.cpp b/src/Application/Application_drawAbout.cpp index c68472d..73e1d1e 100644 --- a/src/Application/Application_drawAbout.cpp +++ b/src/Application/Application_drawAbout.cpp @@ -86,9 +86,10 @@ Application::drawAbout() { ImGui::Separator(); if(ImGui::CollapsingHeader("Licence")) { - ImGui::TextWrapped("This application is made available under the terms of the GNU General Public License, version 3, the full text of which is available below:"); + ImGui::TextWrapped("This application is made available under the terms of the GNU General Public License," + "version 3, the full text of which is available below:"); - if(ImGui::BeginChild("##GPL", {0.0f, float(windowSize().y()) * 0.3f}, true)) { + if(ImGui::BeginChild("##GPL", {0.0f, float(windowSize().y()) * 0.3f}, ImGuiChildFlags_Border)) { static auto licence = _rs.getRaw("COPYING"); ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]); ImGui::TextUnformatted(licence.begin(), licence.end());