]> git.saurik.com Git - wxWidgets.git/commitdiff
need to override DoGetBestClientSize() to get correct size, fixes #13088
authorPaul Cornett <paulcor@bullseye.com>
Sat, 2 Apr 2011 20:43:29 +0000 (20:43 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sat, 2 Apr 2011 20:43:29 +0000 (20:43 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/hyperlink.h
src/gtk/hyperlink.cpp

index 91308f9153fa050075d46a4f7f73569c846a0b66..8156bf10e54ae866a0d66186cc8a14505e39c287 100644 (file)
@@ -9,8 +9,8 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifndef __GTKHYPERLINKCTRLH__
-#define __GTKHYPERLINKCTRLH__
+#ifndef _WX_GTKHYPERLINKCTRL_H_
+#define _WX_GTKHYPERLINKCTRL_H_
 
 #include "wx/generic/hyperlink.h"
 
@@ -62,16 +62,12 @@ public:
     virtual void SetLabel(const wxString &label);
 
 protected:
-    // overridden base class virtuals
-
-    // Returns the best size for the window, which is the size needed
-    // to display the text label.
     virtual wxSize DoGetBestSize() const;
+    virtual wxSize DoGetBestClientSize() const;
 
     virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
 
-private:
     DECLARE_DYNAMIC_CLASS(wxHyperlinkCtrl)
 };
 
-#endif // __GTKHYPERLINKCTRLH__
+#endif // _WX_GTKHYPERLINKCTRL_H_
index 84d6f0dd6d67013ad5931c91cdfae77a6fe99ec3..21610311c50dea1c813a723aba8973d8e45dc757 100644 (file)
@@ -123,6 +123,13 @@ wxSize wxHyperlinkCtrl::DoGetBestSize() const
     return wxGenericHyperlinkCtrl::DoGetBestSize();
 }
 
+wxSize wxHyperlinkCtrl::DoGetBestClientSize() const
+{
+    if ( UseNative() )
+        return wxControl::DoGetBestClientSize();
+    return wxGenericHyperlinkCtrl::DoGetBestClientSize();
+}
+
 void wxHyperlinkCtrl::SetLabel(const wxString &label)
 {
     if ( UseNative() )