Skip to content

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

Description

@rvanlaar

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions