Skip to content

[Bugfix] Solve raw hex display of OP_RETURN for non-latin alphabets#762

Closed
alvroble wants to merge 2 commits intoSeedSigner:devfrom
alvroble:bugfix/opreturn_hex_display
Closed

[Bugfix] Solve raw hex display of OP_RETURN for non-latin alphabets#762
alvroble wants to merge 2 commits intoSeedSigner:devfrom
alvroble:bugfix/opreturn_hex_display

Conversation

@alvroble
Copy link
Contributor

@alvroble alvroble commented May 28, 2025

Description

This PR solves the wrong display of the raw hex OP_RETURN for non-latin alphabets.

Before:

PSBTOpReturnView_raw_hex_data

After:

Two options here:

Commit cfb5a5c: (this one may be just right if the TextArea is scrollable)
PSBTOpReturnView_raw_hex_data_1

Commit 2f1094e:
This one makes the screen to use always the default font size for the hex content.
PSBTOpReturnView_raw_hex_data

Include screenshots of any new or modified screens (or at least explain why they were omitted)

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Documentation
  • Other

Checklist

  • I’ve run pytest and made sure all unit tests pass before sumbitting the PR

If you modified or added functionality/workflow, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms/os:

Note: Keep your changes limited in scope; if you uncover other issues or improvements along the way, ideally submit those as a separate PR. The more complicated the PR the harder to review, test, and merge.

@alvroble alvroble changed the title [Bugfix] Solve raw hex display of OP_RETURN for non-latin languages [Bugfix] Solve raw hex display of OP_RETURN for non-latin alphabets May 28, 2025
text=text,
font_name=GUIConstants.FIXED_WIDTH_FONT_NAME,
font_size=GUIConstants.get_body_font_size(),
font_size=GUIConstants.BODY_FONT_SIZE["default"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add a comment here to explain why we want to force the default size here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like Use default font size for hex text readability?

@kdmukai
Copy link
Contributor

kdmukai commented Jun 10, 2025

I have not carefully reviewed all the changes, but my guess is that 2f1094e on its own is sufficient. Can you confirm?

@alvroble
Copy link
Contributor Author

For some reason, it isn't:
PSBTOpReturnView_raw_hex_data

That's why I refactored the code in cfb5a5c to go char by char filling the lines.

@newtonick
Copy link
Collaborator

@alvroble can you confirm that PR #774 replaces this PR?

@alvroble
Copy link
Contributor Author

@alvroble can you confirm that PR #774 replaces this PR?

@newtonick Yes, I can confirm that the screenshot PSBTOpReturnView_raw_hex_data.png is generated correctly now. I'll close this PR.

@alvroble alvroble closed this Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants