Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic bytesPerLine property depends on the widget size #72

Open
firexx opened this issue Jan 5, 2017 · 5 comments
Open

dynamic bytesPerLine property depends on the widget size #72

firexx opened this issue Jan 5, 2017 · 5 comments

Comments

@firexx
Copy link

firexx commented Jan 5, 2017

No description provided.

@Simsys Simsys added the wontfix label Jan 9, 2017
@Simsys
Copy link
Owner

Simsys commented Jan 9, 2017

To be honest, I don't like this idea. For me that is not useful.

@Simsys Simsys closed this as completed Jan 9, 2017
@firexx
Copy link
Author

firexx commented Jan 10, 2017 via email

@firexx
Copy link
Author

firexx commented Jan 10, 2017

please look at the implementation

void QHexEdit::resizeEvent(QResizeEvent *)
{
if (_dynamicWidth){
int fixGaps = 0;
if (_addressArea)
fixGaps = addressWidth() * _pxCharWidth + _pxGapAdr;
fixGaps += _pxGapAdrHex;
if (_asciiArea)
fixGaps += _pxGapHexAscii;

int charWidth = (width() - fixGaps) / _pxCharWidth;
setBytesPerLine(charWidth / (_asciiArea?4:3));  // 2 hex alfa-digits 1 space 1 ascii per byte = 4; if ascii is disabled then 3

}
adjust();
}

i implemented it for test and it works. would you like to merge this changes then i can create a pull request.

@Simsys
Copy link
Owner

Simsys commented Mar 22, 2019

I missed the chance to see some movement here.

@EvilGitty
Copy link

Simple and easy, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants