need to override DoGetBestClientSize() to get correct size, fixes #13088
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef __GTKHYPERLINKCTRLH__
|
#ifndef _WX_GTKHYPERLINKCTRL_H_
|
||||||
#define __GTKHYPERLINKCTRLH__
|
#define _WX_GTKHYPERLINKCTRL_H_
|
||||||
|
|
||||||
#include "wx/generic/hyperlink.h"
|
#include "wx/generic/hyperlink.h"
|
||||||
|
|
||||||
@@ -62,16 +62,12 @@ public:
|
|||||||
virtual void SetLabel(const wxString &label);
|
virtual void SetLabel(const wxString &label);
|
||||||
|
|
||||||
protected:
|
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 DoGetBestSize() const;
|
||||||
|
virtual wxSize DoGetBestClientSize() const;
|
||||||
|
|
||||||
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
||||||
|
|
||||||
private:
|
|
||||||
DECLARE_DYNAMIC_CLASS(wxHyperlinkCtrl)
|
DECLARE_DYNAMIC_CLASS(wxHyperlinkCtrl)
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __GTKHYPERLINKCTRLH__
|
#endif // _WX_GTKHYPERLINKCTRL_H_
|
||||||
|
@@ -123,6 +123,13 @@ wxSize wxHyperlinkCtrl::DoGetBestSize() const
|
|||||||
return wxGenericHyperlinkCtrl::DoGetBestSize();
|
return wxGenericHyperlinkCtrl::DoGetBestSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxSize wxHyperlinkCtrl::DoGetBestClientSize() const
|
||||||
|
{
|
||||||
|
if ( UseNative() )
|
||||||
|
return wxControl::DoGetBestClientSize();
|
||||||
|
return wxGenericHyperlinkCtrl::DoGetBestClientSize();
|
||||||
|
}
|
||||||
|
|
||||||
void wxHyperlinkCtrl::SetLabel(const wxString &label)
|
void wxHyperlinkCtrl::SetLabel(const wxString &label)
|
||||||
{
|
{
|
||||||
if ( UseNative() )
|
if ( UseNative() )
|
||||||
|
Reference in New Issue
Block a user