ui: Fixed sizing of several popups
This commit is contained in:
parent
8a6b110d0b
commit
ed8ee35a86
@ -519,11 +519,7 @@ namespace hex {
|
||||
continue;
|
||||
|
||||
if (view->isAvailable()) {
|
||||
auto minSize = view->getMinSize();
|
||||
minSize.x *= SharedData::globalScale;
|
||||
minSize.y *= SharedData::globalScale;
|
||||
|
||||
ImGui::SetNextWindowSizeConstraints(minSize, view->getMaxSize());
|
||||
ImGui::SetNextWindowSizeConstraints(scaled(view->getMinSize()), scaled(view->getMaxSize()));
|
||||
view->drawContent();
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,8 @@ namespace hex::plugin::builtin {
|
||||
[[nodiscard]] bool shouldProcess() const override { return true; }
|
||||
|
||||
[[nodiscard]] bool hasViewMenuItemEntry() const override { return false; }
|
||||
[[nodiscard]] ImVec2 getMinSize() const override { return ImVec2(400, 100); }
|
||||
[[nodiscard]] ImVec2 getMaxSize() const override { return ImVec2(400, 100); }
|
||||
[[nodiscard]] ImVec2 getMinSize() const override { return { 400, 100 }; }
|
||||
[[nodiscard]] ImVec2 getMaxSize() const override { return { 400, 100 }; }
|
||||
|
||||
private:
|
||||
enum class MatchType {
|
||||
|
@ -18,9 +18,8 @@ namespace hex::plugin::builtin {
|
||||
|
||||
[[nodiscard]] bool hasViewMenuItemEntry() const override { return false; }
|
||||
|
||||
[[nodiscard]] ImVec2 getMinSize() const override {
|
||||
return scaled(ImVec2(500, 300));
|
||||
}
|
||||
[[nodiscard]] ImVec2 getMinSize() const override { return { 500, 300 }; }
|
||||
[[nodiscard]] ImVec2 getMaxSize() const override { return { 500, 300 }; }
|
||||
};
|
||||
|
||||
}
|
@ -566,7 +566,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_Appearing, ImVec2(0.5F, 0.5F));
|
||||
if (ImGui::BeginPopupModal("hex.builtin.view.pattern_editor.menu.file.load_pattern"_lang, &opened, ImGuiWindowFlags_AlwaysAutoResize)) {
|
||||
|
||||
if (ImGui::BeginListBox("##patterns", ImVec2(-FLT_MIN, 0))) {
|
||||
if (ImGui::BeginListBox("##patterns", ImVec2(300_scaled, 0))) {
|
||||
|
||||
u32 index = 0;
|
||||
for (auto &path : this->m_possiblePatternFiles) {
|
||||
|
Loading…
Reference in New Issue
Block a user