1. Victor Stinner
  2. hachoir

Commits

nneonneo  committed 4947993

wx: Correct Windows hexview width calculation.

  • Participants
  • Parent commits c09a20b
  • Branches default

Comments (0)

Files changed (1)

File hachoir-wx/hachoir_wx/hex_view/compat_msw.py

View file
  • Ignore whitespace
 # Windows wx compatibility
 
 def get_width_chars(view):
-    return (view.GetClientSize()[0]-5) // (view.GetCharWidth()-1) // 3
+    return ((view.GetClientSize()[0]-3) // (view.GetCharWidth()-1) - 1) // 3
 
 def get_height_chars(view):
     return view.GetClientSize()[1] // view.GetCharHeight()