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

Gtk-Warning 'Negative content width' in WxConstructHexEditor #32

Open
rvanlaar opened this issue Jul 8, 2023 · 0 comments · May be fixed by #35
Open

Gtk-Warning 'Negative content width' in WxConstructHexEditor #32

rvanlaar opened this issue Jul 8, 2023 · 0 comments · May be fixed by #35

Comments

@rvanlaar
Copy link

rvanlaar commented Jul 8, 2023

The following error occurs:

(example.py:46458): Gtk-WARNING **: 15:32:24.623: Negative content width -22 (allocation 12, extents 17x17) while allocating gadget (node button, owner GtkButton)

Changing the value of 12 tot 35 shows the '«' and gets rid of the error.
on line: https://github.com/timrid/construct-editor/blob/main/construct_editor/wx_widgets/wx_construct_hex_editor.py#L113

Steps to reproduce:
Run the example program:

## example.py
import wx
import construct as cs
from construct_editor.wx_widgets import WxConstructHexEditor

constr = cs.Struct(
    "a" / cs.Int16sb,
    "b" / cs.Int16sb,
)
b = bytes([0x12, 0x34, 0x56, 0x78])

app = wx.App(False)
frame = wx.Frame(None, title="Construct Hex Editor", size=(1000, 200))
editor_panel = WxConstructHexEditor(frame, construct=constr, binary=b)
editor_panel.construct_editor.expand_all()
frame.Show(True)
app.MainLoop()

Run the program, hoover over the divider in the middle and this error will show in the terminal:

(example.py:46458): Gtk-WARNING **: 15:32:24.623: Negative content width -22 (allocation 12, extents 17x17) while allocating gadget (node button, owner GtkButton)

Versions:
construct-editor: 0.1.4
construct: 2.10.68
wxpython: 4.2.1
ubuntu: 22.04.2

Ircama added a commit to Ircama/construct-editor that referenced this issue Dec 8, 2023
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 a pull request may close this issue.

1 participant