I’ve just discovered a small issue in DirectDialog.
To start with, I’m using the Ubuntu-Trusty 64-bit “dev” version of Panda (as downloaded from here), and am using that as the reference for code and line numbers, I believe.
The issue, then, is that the “frameSize” constructor keyword doesn’t seem to be respected: DirectDialog generates its own frame-size regardless of any values given via the keyword, from what I see. Setting the frame-size after construction seems to work as expected.
Specifically, the line that produces this appears to be line 319 of DirectDialog.py, in “configureDialog”:
self['frameSize'] = (l, r, b, t)
Having this line does make sense to me (it generates a reasonable dialogue-size given the controls within the frame, I believe)–as long as “frameSize” hasn’t been explicitly set. Perhaps a simple “is None” check would suffice–I’m inclined to suggest line 310 as a good position for it:
# Line 310
if self['frameSize'] is None:
# The following is the extant code, I believe.
# Resize frame to fit text and buttons
l = min(bPos + bl, l) - pad[0]
r = max(bMax + br, r) + pad[0]
sidePad = self['sidePad']
l -= sidePad
r += sidePad
# reduce bottom by pad, button height and 2*button pad
b = min(b - self['midPad'] - bpad[1] - bHeight - bpad[1], b) - pad[1]
t = t + self['topPad'] + pad[1]
self['frameSize'] = (l, r, b, t)
self['image_scale'] = (r - l, 1, t - b)
# Center frame about text and buttons
self['image_pos'] = ((l+r)*0.5, 0.0, (b+t)*0.5)
self.resetFrameSize()