font retrieval synched for setsize and bestsize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -483,7 +483,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
|||||||
{
|
{
|
||||||
if (i&&((i%m_majorDim)==0)) // not to do for the zero button!
|
if (i&&((i%m_majorDim)==0)) // not to do for the zero button!
|
||||||
{
|
{
|
||||||
if (m_windowStyle & wxRA_VERTICAL)
|
if (m_windowStyle & wxRA_SPECIFY_ROWS)
|
||||||
{
|
{
|
||||||
x_offset += maxWidth + charWidth;
|
x_offset += maxWidth + charWidth;
|
||||||
y_offset = y_start;
|
y_offset = y_start;
|
||||||
@@ -512,7 +512,7 @@ wxSize wxRadioBox::DoGetBestSize() const
|
|||||||
int eachWidth, eachHeight;
|
int eachWidth, eachHeight;
|
||||||
int totWidth, totHeight;
|
int totWidth, totHeight;
|
||||||
|
|
||||||
wxFont font = GetParent()->GetFont();
|
wxFont font = /*GetParent()->*/GetFont();
|
||||||
GetTextExtent(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),
|
GetTextExtent(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"),
|
||||||
&charWidth, &charHeight, NULL, NULL, &font);
|
&charWidth, &charHeight, NULL, NULL, &font);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user