mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
impr: Replace various fixed-size boxes with dynamic ones
This commit is contained in:
@@ -115,7 +115,7 @@ namespace hex::plugin::builtin {
|
||||
this->m_mode = cs_mode(0);
|
||||
|
||||
// Draw sub-settings for each architecture
|
||||
if (ImGui::BeginChild("modes", ImVec2(0, ImGui::GetTextLineHeightWithSpacing() * 6), true, ImGuiWindowFlags_AlwaysAutoResize)) {
|
||||
if (ImGui::BeginBox()) {
|
||||
|
||||
// Draw endian radio buttons. This setting is available for all architectures
|
||||
static int littleEndian = true;
|
||||
@@ -374,8 +374,9 @@ namespace hex::plugin::builtin {
|
||||
this->m_mode = cs_mode(0);
|
||||
break;
|
||||
}
|
||||
|
||||
ImGui::EndBox();
|
||||
}
|
||||
ImGui::EndChild();
|
||||
}
|
||||
|
||||
// Draw disassemble button
|
||||
|
||||
@@ -67,11 +67,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
firstSubCategory = false;
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, scaled({5, 5}));
|
||||
if (ImGui::BeginTable("##subCategory", 1, ImGuiTableFlags_BordersOuter | ImGuiTableFlags_SizingStretchSame)) {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
if (ImGui::BeginBox()) {
|
||||
for (auto &setting : subCategory.entries) {
|
||||
ImGui::BeginDisabled(!setting.widget->isEnabled());
|
||||
bool settingChanged = setting.widget->draw(LangEntry(setting.unlocalizedName));
|
||||
@@ -102,9 +98,8 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndTable();
|
||||
ImGui::EndBox();
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user