WerWolv / ImHex

🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.
https://imhex.werwolv.net
GNU General Public License v2.0
39.54k stars 1.74k forks source link

[Feature] Change the Differ's bottom section's height by just dragging up or down #1707

Open NastyFlytrap opened 1 month ago

NastyFlytrap commented 1 month ago

What feature would you like to see?

The diffing tab has a bottom section that lists the changed bits. I want to make that less tall, and preferably be able to adjust it on the fly by just grabbing the edge and pulling up or down.

How will this feature be useful to you and others?

It'd make the application more customizable.

Request Type

Additional context?

No response

sisco0 commented 3 weeks ago

Source code section of interest is found at diffing plugin, specifically at the view_diff.cpp file.

I could observe that we have ImGuiTableFlags_Resizable flag active. However, @WerWolv, should we have some kind of Split for the current behavior to work as expected? (Resizable).

Might be somehing like the following before going on the differences table should do the trick?

    // Add the splitter to adjust the height of the bottom section
    ImGui::Splitter(true, 4.0f, &bottom_height, nullptr, 100.0f, 100.0f, height);
WerWolv commented 3 weeks ago

I'm not sure an API like that exists but I have some similar code in the pattern editor view already where the console window is resizable. Maybe the same could be done in the diff view too

sisco0 commented 3 weeks ago

Thank you for this tip @WerWolv.

Considering the given answer, it would be compliant that a modification over the view_diff.cpp file be performed that contains a similar content such as the one referred to the dragging variable at view_pattern_editor.cpp.