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

support change font size using setFont(...) #55

Closed
shinespeciall opened this issue May 11, 2021 · 5 comments
Closed

support change font size using setFont(...) #55

shinespeciall opened this issue May 11, 2021 · 5 comments
Assignees
Labels

Comments

@shinespeciall
Copy link

currently using this can only change the font size but the rendered lines' position in the widget are fixed

hexview->setFont(QFont("Timers", 8, QFont::Bold));
image

@Dax89 Dax89 self-assigned this May 21, 2021
@Dax89 Dax89 added the bug label May 21, 2021
@Dax89
Copy link
Owner

Dax89 commented May 21, 2021

I have made some changes, let me know if it works!

@shinespeciall
Copy link
Author

it works, thanks for the quick fix !
image

@aerosoul94
Copy link
Contributor

@shinespeciall How did you make 00 and FF bytes the same color?

@shinespeciall
Copy link
Author

shinespeciall commented May 22, 2021

i think that is cused by the phantomstyle theme i am using or the palette settings for the whole project:
phantomstyle: https://github.com/randrew/phantomstyle/tree/master
custom color in the project: https://github.com/wario-land/WL4Editor/blob/chunk_editor/Themes.h
reset the project's UI palette: https://github.com/wario-land/WL4Editor/blob/chunk_editor/WL4EditorWindow.cpp#L41

wait, it didn't happen when i implement the hexview at first, so the reason should be elsewhere. idk, at first, i test the hexview in a way provided by the readme file in this repo (it looks like the first pic in this issue), but now i put a QFrame in the ui file and promote it to the hexview, then it looks like the second pic in this issue. (the details are in chunk_editor branch atm)
i just commented out the setFont code but the FF and 00 still remain the modified style, so perhaps it is caused by the subclassing and the theme and palette settings?

@Dax89
Copy link
Owner

Dax89 commented May 22, 2021

00 and FF bytes' color are changed here:

https://github.com/Dax89/QHexView/blob/master/document/qhexrenderer.cpp#L218

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

No branches or pull requests

3 participants