added fix for readme window dimensions (wrong text extent returned)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,7 +69,8 @@ class ScrolledMessageDialog(wxDialog):
|
|||||||
wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY)
|
wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY)
|
||||||
text.SetFont(modernFont)
|
text.SetFont(modernFont)
|
||||||
dc = wxWindowDC(text)
|
dc = wxWindowDC(text)
|
||||||
w, h = dc.GetTextExtent(' ')
|
# !!! possible bug - GetTextExtent without font returns sysfont dims
|
||||||
|
w, h = dc.GetFullTextExtent(' ', modernFont)[:2]
|
||||||
ok = wxButton(self, wxID_OK, "OK")
|
ok = wxButton(self, wxID_OK, "OK")
|
||||||
text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok)))
|
text.SetConstraints(Layoutf('t=t5#1;b=t5#2;l=l5#1;r=r5#1', (self,ok)))
|
||||||
text.SetSize((w * 80 + 30, h * 40))
|
text.SetSize((w * 80 + 30, h * 40))
|
||||||
|
Reference in New Issue
Block a user