Make theme load/save as windows fill the window too
This commit is contained in:
parent
3894aa8537
commit
35077a3e58
1 changed files with 71 additions and 67 deletions
12
theme.cpp
12
theme.cpp
|
@ -205,8 +205,9 @@ bool Theme::ShowEditor(bool* open, Theme* &theme, ImGuiID dockid, int window_wid
|
||||||
}
|
}
|
||||||
if (loadOpen) {
|
if (loadOpen) {
|
||||||
ImGui::OpenPopup("Load...");
|
ImGui::OpenPopup("Load...");
|
||||||
}
|
ImGui::SetNextWindowPos(ImVec2(0, 0));
|
||||||
if (ImGui::BeginPopupModal("Load...", &loadOpen)) {
|
ImGui::SetNextWindowSize(ImVec2(window_width, window_height));
|
||||||
|
if (ImGui::BeginPopupModal("Load...", nullptr, ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize)) {
|
||||||
static path selectedThemePath;
|
static path selectedThemePath;
|
||||||
static char filter[1024] = {0};
|
static char filter[1024] = {0};
|
||||||
ImGui::Text("Filter:"); ImGui::SameLine();
|
ImGui::Text("Filter:"); ImGui::SameLine();
|
||||||
|
@ -246,10 +247,12 @@ bool Theme::ShowEditor(bool* open, Theme* &theme, ImGuiID dockid, int window_wid
|
||||||
}
|
}
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (saveAsOpen) {
|
if (saveAsOpen) {
|
||||||
ImGui::OpenPopup("Save as...");
|
ImGui::OpenPopup("Save as...");
|
||||||
}
|
ImGui::SetNextWindowPos(ImVec2(0, 0));
|
||||||
if (ImGui::BeginPopupModal("Save as...", &saveAsOpen)) {
|
ImGui::SetNextWindowSize(ImVec2(window_width, window_height));
|
||||||
|
if (ImGui::BeginPopupModal("Save as...", nullptr, ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize)) {
|
||||||
static char selectedThemeName[1024] = {0};
|
static char selectedThemeName[1024] = {0};
|
||||||
static char filter[1024] = {0};
|
static char filter[1024] = {0};
|
||||||
ImGui::Text("Filter:"); ImGui::SameLine();
|
ImGui::Text("Filter:"); ImGui::SameLine();
|
||||||
|
@ -290,6 +293,7 @@ bool Theme::ShowEditor(bool* open, Theme* &theme, ImGuiID dockid, int window_wid
|
||||||
}
|
}
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void Theme::Apply(float hue) {
|
void Theme::Apply(float hue) {
|
||||||
|
|
Loading…
Reference in a new issue