afrantzis / bless

Bless - Gtk# Hex Editor
GNU General Public License v2.0
216 stars 38 forks source link

Minimum number of columns #35

Open ferdymercury opened 4 years ago

ferdymercury commented 4 years ago

The window of Bless can be resized only until a minimum size, that in my case equals to 12 columns in the byte viewer.

image

But sometimes, it would be helfpul to reduce even more the width, so that the number of columns matches with the byte alignment. For example, if a binary file has an array of 8-byte words, one can not align that well right now (and I would prefer not having to resize to 16).

Maybe the resizing of the window could be decoupled from the resizing of the number of columns shown in the byte visualizer? The remaining columns could be filled with empty spaces maybe?

Or maybe that in the settings, one could select the minimum number of columns, so that it can be changed from the default 12 to a custom number?

ferdymercury commented 4 years ago

For example, wxHexeditor allows resizing down to 1 column: https://www.wxhexeditor.org/images/screenshot.png

Hordeking commented 4 years ago

I have this same request. Except when I have my font set to 10pt, the minimum I can get is 21 bytes on a row. Sometimes I'd like to do it in 16 byte paragraphs.

To me, this seems like an arbitrary limitation.

afrantzis commented 4 years ago

Hi! The total minimum size limitation stems from the minimum sizes imposed by the various widget in the window. One way to get a reduction is to hide these widgets. The main offender is the conversion window (i.e., the one that has the maximum minimum size), but the toolbar and statusbar also contribute. You can hide some/all of these to allow the window to become smaller.

Ideally the main view would be resizable in some way independently of the window, in order to avoid depending on other widget minimum sizes. That's not directly implemented at this point, but one can set the <bpr> tag in the layout file, in order to set the desired/maximum bytes per row to display. See for example the layout: https://github.com/afrantzis/bless/blob/master/data/bless-16-bytes-per-row.layout