Remove unnecessary call to wxClientDC::SetFont() in wxStaticText
wxClientDC already uses the font of the associated window by default, so there is no need to set it explicitly. No real changes, this is just a micro optimization.
This commit is contained in:
parent
be3ea1768a
commit
9f8d56b283
1 changed files with 0 additions and 5 deletions
|
|
@ -89,11 +89,6 @@ WXDWORD wxStaticText::MSWGetStyle(long style, WXDWORD *exstyle) const
|
||||||
wxSize wxStaticText::DoGetBestClientSize() const
|
wxSize wxStaticText::DoGetBestClientSize() const
|
||||||
{
|
{
|
||||||
wxClientDC dc(const_cast<wxStaticText *>(this));
|
wxClientDC dc(const_cast<wxStaticText *>(this));
|
||||||
wxFont font(GetFont());
|
|
||||||
if (!font.IsOk())
|
|
||||||
font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
|
||||||
|
|
||||||
dc.SetFont(font);
|
|
||||||
|
|
||||||
wxCoord widthTextMax, heightTextTotal;
|
wxCoord widthTextMax, heightTextTotal;
|
||||||
dc.GetMultiLineTextExtent(GetLabelText(), &widthTextMax, &heightTextTotal);
|
dc.GetMultiLineTextExtent(GetLabelText(), &widthTextMax, &heightTextTotal);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue