X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/22a35096a0a9c3fe4d3d32b8d68a361126ef9677..032bc940fcde34cc649eaa111cd6aff1cda66104:/src/generic/hyperlink.cpp diff --git a/src/generic/hyperlink.cpp b/src/generic/hyperlink.cpp index 864ff142b1..21f80fc131 100644 --- a/src/generic/hyperlink.cpp +++ b/src/generic/hyperlink.cpp @@ -53,6 +53,8 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_HYPERLINK) // reserved for internal use only #define wxHYPERLINKCTRL_POPUP_COPY_ID 16384 +const wxChar wxHyperlinkCtrlNameStr[] = wxT("hyperlink"); + // ---------------------------------------------------------------------------- // wxHyperlinkCtrl // ---------------------------------------------------------------------------- @@ -113,10 +115,8 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id, f.SetUnderlined(true); SetFont(f); - CacheBestSize(DoGetBestSize()); - SetMinSize(GetBestSize()); - SetSize (DoGetBestSize()); - + SetInitialSize(size); + return true; } @@ -128,14 +128,11 @@ wxSize wxHyperlinkCtrl::DoGetBestSize() const dc.SetFont(GetFont()); dc.GetTextExtent(GetLabel(), &w, &h); - return wxSize(w, h); + wxSize best(w, h); + CacheBestSize(best); + return best; } -void wxHyperlinkCtrl::DoGetSize(int *width, int *height) const -{ - if (width) *width = GetBestSize().GetWidth(); - if (height) *height = GetBestSize().GetHeight(); -} void wxHyperlinkCtrl::SetNormalColour(const wxColour &colour) {