From 4c9459def305a06e2cb8d055b4d5e5e7e9c6ab7f Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 25 Feb 2021 21:51:12 +0100 Subject: [PATCH] ui: Various ui improvements --- source/views/view_bookmarks.cpp | 6 +++++- source/views/view_disassembler.cpp | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/source/views/view_bookmarks.cpp b/source/views/view_bookmarks.cpp index 30822b612..9ef1a9614 100644 --- a/source/views/view_bookmarks.cpp +++ b/source/views/view_bookmarks.cpp @@ -97,7 +97,11 @@ namespace hex { bookmarkToRemove = iter; ImGui::SameLine(0, 15); - ImGui::Checkbox("Locked", &locked); + if (locked) { + if (ImGui::Button(ICON_FA_LOCK)) locked = false; + } else { + if (ImGui::Button(ICON_FA_UNLOCK)) locked = true; + } ImGui::NewLine(); ImGui::TextUnformatted("hex.view.bookmarks.header.name"_lang); diff --git a/source/views/view_disassembler.cpp b/source/views/view_disassembler.cpp index f03848791..1773613b6 100644 --- a/source/views/view_disassembler.cpp +++ b/source/views/view_disassembler.cpp @@ -118,7 +118,7 @@ namespace hex { ImGui::Combo("hex.view.disassembler.arch"_lang, reinterpret_cast(&this->m_architecture), Disassembler::ArchitectureNames, Disassembler::getArchitectureSupportedCount()); - if (ImGui::BeginChild("modes", ImVec2(0, 100), true)) { + if (ImGui::BeginChild("modes", ImVec2(0, ImGui::GetTextLineHeightWithSpacing() * 6), true, ImGuiWindowFlags_AlwaysAutoResize)) { if (ImGui::RadioButton("hex.common.little_endian"_lang, this->m_littleEndianMode)) this->m_littleEndianMode = true;