Dax89 / QHexView

A versatile Hexadecimal widget for Qt5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Renderer does not work well with widget’s width

T-640 opened this issue · comments

commented

Hello!

If Widget’s width is larger than renderer’s painting area it simply paints white after the ASCII column. This does not look good. Renderer should paint over the entire widget’s area. I see two possible solutions:

  1. Stretch and automatically increase font as widget grows larger;

  2. Set fixed width on widget, give control over how it resizes to renderer instead. Widget’s size could then be set programmatically by some external event, say font change, for example. Something like this could be called each time widget needs to resize: hex_view->setMaximumWidth (m_renderer->documentWidth())

Hi

could you please give some example of this.

Which version of the code are you using?

commented

I was using the latest version (as of the date of opening this issue). This is what I am talking about:

Hex view visual issue

This is what VSCode does.

2021-05-23-180552_1920x1080_scrot

commented

Looks odd as well from my point of view. Although it would seem that every other hex editor does it this way. Just had a look at HxD (hex editor for Windows) and there it is this same gap between data and scroll bar. I guess this might be just my personal preference then.

But still, don’t you find that huge gap odd? Wouldn’t it be more aesthetically pleasing for the scroll bar to always be next to the ASCII column no matter what, without these big gaps in-between?

commented

Fixed in 5.0, call QHexView::setAutoWidth(true) for it to take effect.