Skip to content

Commit

Permalink
beautify the output
Browse files Browse the repository at this point in the history
  • Loading branch information
th3w1zard1 committed Mar 20, 2024
1 parent 849bf1f commit 897bbf3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Tools/HolocronToolset/src/toolset/gui/editors/gff.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,13 @@ def set_spinbox(minv: int, maxv: int, item: QListWidgetItem):
if child.widget():
child.widget().deleteLater()

# Display raw binary data in a QLabel with word wrapping enabled
binaryDataLabel = QLabel(f"{binaryData}")
# Convert binary data to a hexadecimal string for display
hexDataStr = " ".join(f"{b:02X}" for b in binaryData)

# Display the hexadecimal data in a QLabel with word wrapping enabled
binaryDataLabel = QLabel(f"{hexDataStr}")
binaryDataLabel.setWordWrap(True)
binaryDataLabel.setFont(QFont("Courier New", 8)) # Set a monospaced font
binaryDataLabel.setFont(QFont("Courier New", 7)) # Set a monospaced font
binaryDataLabel.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Preferred)
binaryDataLabel.setMaximumWidth(self.ui.blankPage.width()-20) # Set the max width to the parent's width

Expand Down

0 comments on commit 897bbf3

Please sign in to comment.