Mahlet-Inc / hobbits

A multi-platform GUI for bit-based analysis, processing, and visualization
https://mahlet-inc.github.io
MIT License
660 stars 45 forks source link

feat: add setting for numerical base of addresses #161

Open hut8 opened 1 year ago

hut8 commented 1 year ago

Resolves #160

So, this does it for the hex display... but two things I'd like feedback on. First, I should probably use a dropdown instead of a spinbox because nobody wants base 15. Also, now that I'm using this more (great software, btw!), I noticed that most of the other display plugins have the same setting. So would you be alright with me putting this in the settings dialog, rather than in each area separately?

hello-adam commented 1 year ago

Yeah, the settings option is definitely reasonable - I mentioned it as a "lazy" option in the issue (#160), but the only real downside is that it doesn't make the display and its configuration completely decoupled from the rest of the program and other displays. Maybe in this case you don't care if it's not decoupled?

I think you also need to update the width calculation for the address header for the different bases at https://github.com/Mahlet-Inc/hobbits/blob/master/src/hobbits-plugins/displays/Hex/hex.cpp#LL146C19-L146C19