Commit 33871967 authored by Gauthier Quesnel's avatar Gauthier Quesnel
Browse files

gui: fix load/save model box sizes

parent 4ffe3c65
Pipeline #11509 passed with stage
in 45 seconds
......@@ -215,7 +215,7 @@ load_file_dialog(std::filesystem::path& out)
if (!path_click) {
ImVec2 size = ImGui::GetContentRegionMax();
size.y /= 1.5f;
size.y *= 0.8f;
ImGui::BeginChild("##select_files", size);
......@@ -323,10 +323,9 @@ save_file_dialog(std::filesystem::path& out)
if (!path_click) {
ImVec2 size = ImGui::GetContentRegionMax();
size.y /= 1.5f;
size.y *= 0.8f;
ImGui::BeginChild("##select_files", size);
if (ImGui::Selectable("..##select_file", (fd.selected == ".."))) {
if (next.empty()) {
next = fd.current.parent_path();
......
......@@ -781,6 +781,8 @@ struct editor
if (show_load_file_dialog) {
static std::string out;
auto size = ImGui::GetContentRegionMax();
ImGui::SetNextWindowSize(ImVec2(size.x * 0.7f, size.y * 0.7f));
ImGui::OpenPopup("Select file path to load");
if (load_file_dialog(path)) {
......@@ -800,6 +802,8 @@ struct editor
ImGui::OpenPopup("Select file path to save");
auto size = ImGui::GetContentRegionMax();
ImGui::SetNextWindowSize(ImVec2(size.x * 0.7f, size.y * 0.7f));
if (save_file_dialog(path)) {
show_save_file_dialog = false;
log_w.log(5, "Save file to %s\n", path.string().c_str());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment