}
if (bitmap.Ok())
control = new wxBitmapButton(parent, id, bitmap, pos, size,
- childResource->GetStyle(), wxDefaultValidator, childResource->GetName());
+ childResource->GetStyle() | wxBU_AUTODRAW, wxDefaultValidator, childResource->GetName());
}
else
// Normal, text button
else
{
if (control && childResource->GetFont().Ok())
+ {
control->SetFont(childResource->GetFont());
+
+#ifdef __WXMSW__
+ // Force the layout algorithm since the size changes the layout
+ if (control->IsKindOf(CLASSINFO(wxRadioBox)))
+ {
+ control->SetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH|wxSIZE_AUTO_HEIGHT);
+ }
+#endif
+ }
}
return control;
}
if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
{
- // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count)));
- // Do nothing - no label font any more
- count ++;
- if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
- controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
+ // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count)));
+ // Skip past the obsolete label font spec if there are two consecutive specs
+ if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList)
+ count ++;
+ controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
}
}
}
if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
{
- // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count)));
- // Do nothing
- count ++;
-
- if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
- controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
+ // Skip past the obsolete label font spec if there are two consecutive specs
+ if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList)
+ count ++;
+ controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
}
}
}
}
if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
{
- // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count)));
- count ++;
- if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
- controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
+ // Skip past the obsolete label font spec if there are two consecutive specs
+ if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList)
+ count ++;
+ controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
}
}
}
if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
{
- // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count)));
- count ++;
-
- if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
- controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
+ // Skip past the obsolete label font spec if there are two consecutive specs
+ if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList)
+ count ++;
+ controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
}
}
}
if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
{
- // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count)));
- count ++;
-
- if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
- controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
+ // Skip past the obsolete label font spec if there are two consecutive specs
+ if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList)
+ count ++;
+ controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
}
}
}
if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
{
- // controlItem->SetLabelFont(wxResourceInterpretFontSpec(expr->Nth(count)));
- count ++;
-
- if (expr->Nth(count) && expr->Nth(count)->Type() == PrologList)
- controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
+ // Skip past the obsolete label font spec if there are two consecutive specs
+ if (expr->Nth(count+1) && expr->Nth(count+1)->Type() == PrologList)
+ count ++;
+ controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
}
}
}
return wxBitmap(name, bitmapType);
}
}
- return wxNullBitmap;
+#ifndef __WXGTK__
+ return wxNullBitmap;
+#endif
}
else
{