impr: Use ImGui::SeparatorText to draw headers
This commit is contained in:
parent
60e3a657f0
commit
46b1b0ba17
@ -308,8 +308,7 @@ namespace ImGui {
|
|||||||
void Header(const char *label, bool firstEntry) {
|
void Header(const char *label, bool firstEntry) {
|
||||||
if (!firstEntry)
|
if (!firstEntry)
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
ImGui::TextUnformatted(label);
|
ImGui::SeparatorText(label);
|
||||||
ImGui::Separator();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HeaderColored(const char *label, ImColor color, bool firstEntry) {
|
void HeaderColored(const char *label, ImColor color, bool firstEntry) {
|
||||||
|
@ -96,8 +96,7 @@ namespace hex::plugin::builtin {
|
|||||||
|
|
||||||
auto provider = ImHexApi::Provider::get();
|
auto provider = ImHexApi::Provider::get();
|
||||||
if (ImHexApi::Provider::isValid() && provider->isReadable()) {
|
if (ImHexApi::Provider::isValid() && provider->isReadable()) {
|
||||||
ImGui::TextUnformatted("hex.builtin.view.disassembler.position"_lang);
|
ImGui::Header("hex.builtin.view.disassembler.position"_lang, true);
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
// Draw base address input
|
// Draw base address input
|
||||||
ImGui::InputHexadecimal("hex.builtin.view.disassembler.base"_lang, &this->m_baseAddress, ImGuiInputTextFlags_CharsHexadecimal);
|
ImGui::InputHexadecimal("hex.builtin.view.disassembler.base"_lang, &this->m_baseAddress, ImGuiInputTextFlags_CharsHexadecimal);
|
||||||
|
@ -101,8 +101,7 @@ namespace hex::plugin::builtin {
|
|||||||
void ViewYara::drawContent() {
|
void ViewYara::drawContent() {
|
||||||
if (ImGui::Begin(View::toWindowName("hex.builtin.view.yara.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
|
if (ImGui::Begin(View::toWindowName("hex.builtin.view.yara.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoCollapse)) {
|
||||||
|
|
||||||
ImGui::TextUnformatted("hex.builtin.view.yara.header.rules"_lang);
|
ImGui::Header("hex.builtin.view.yara.header.rules"_lang, true);
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
if (ImGui::BeginListBox("##rules", ImVec2(-FLT_MIN, ImGui::GetTextLineHeightWithSpacing() * 5))) {
|
if (ImGui::BeginListBox("##rules", ImVec2(-FLT_MIN, ImGui::GetTextLineHeightWithSpacing() * 5))) {
|
||||||
for (u32 i = 0; i < this->m_rules->size(); i++) {
|
for (u32 i = 0; i < this->m_rules->size(); i++) {
|
||||||
@ -149,9 +148,7 @@ namespace hex::plugin::builtin {
|
|||||||
ImGui::TextSpinner("hex.builtin.view.yara.matching"_lang);
|
ImGui::TextSpinner("hex.builtin.view.yara.matching"_lang);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::NewLine();
|
ImGui::Header("hex.builtin.view.yara.header.matches"_lang);
|
||||||
ImGui::TextUnformatted("hex.builtin.view.yara.header.matches"_lang);
|
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
auto matchesTableSize = ImGui::GetContentRegionAvail();
|
auto matchesTableSize = ImGui::GetContentRegionAvail();
|
||||||
matchesTableSize.y *= 3.75 / 5.0;
|
matchesTableSize.y *= 3.75 / 5.0;
|
||||||
|
@ -19,8 +19,7 @@ namespace hex::plugin::windows {
|
|||||||
void ViewTTYConsole::drawContent() {
|
void ViewTTYConsole::drawContent() {
|
||||||
if (ImGui::Begin(View::toWindowName("hex.windows.view.tty_console.name").c_str(), &this->getWindowOpenState())) {
|
if (ImGui::Begin(View::toWindowName("hex.windows.view.tty_console.name").c_str(), &this->getWindowOpenState())) {
|
||||||
|
|
||||||
ImGui::TextUnformatted("hex.windows.view.tty_console.config"_lang);
|
ImGui::Header("hex.windows.view.tty_console.config"_lang, true);
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
bool connected = this->m_portHandle != INVALID_HANDLE_VALUE;
|
bool connected = this->m_portHandle != INVALID_HANDLE_VALUE;
|
||||||
|
|
||||||
@ -107,9 +106,7 @@ namespace hex::plugin::windows {
|
|||||||
|
|
||||||
ImGui::Checkbox("hex.windows.view.tty_console.auto_scroll"_lang, &this->m_shouldAutoScroll);
|
ImGui::Checkbox("hex.windows.view.tty_console.auto_scroll"_lang, &this->m_shouldAutoScroll);
|
||||||
|
|
||||||
ImGui::NewLine();
|
ImGui::Header("hex.windows.view.tty_console.console"_lang);
|
||||||
ImGui::TextUnformatted("hex.windows.view.tty_console.console"_lang);
|
|
||||||
ImGui::Separator();
|
|
||||||
|
|
||||||
auto consoleSize = ImGui::GetContentRegionAvail();
|
auto consoleSize = ImGui::GetContentRegionAvail();
|
||||||
consoleSize.y -= ImGui::GetTextLineHeight() + ImGui::GetStyle().FramePadding.y * 4;
|
consoleSize.y -= ImGui::GetTextLineHeight() + ImGui::GetStyle().FramePadding.y * 4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user