]> git.saurik.com Git - wxWidgets.git/commitdiff
use full repaint style instead of size event
authorPaul Cornett <paulcor@bullseye.com>
Thu, 8 Mar 2007 04:27:29 +0000 (04:27 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Thu, 8 Mar 2007 04:27:29 +0000 (04:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/hyperlink.h
src/generic/hyperlinkg.cpp

index 93a086f565ecc98b6e7c3e25c78146f9605a616b..f50ded885987a27c8b51add769ad3d477c66d3f2 100644 (file)
@@ -9,12 +9,8 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifndef __GENERICHYPERLINKCTRLH__
-#define __GENERICHYPERLINKCTRLH__
-
-#include "wx/defs.h"
-#include "wx/control.h"
-
+#ifndef _WX_GENERICHYPERLINKCTRL_H_
+#define _WX_GENERICHYPERLINKCTRL_H_
 
 // ----------------------------------------------------------------------------
 // wxGenericHyperlinkCtrl
@@ -100,10 +96,6 @@ protected:
     // handles "Copy URL" menuitem
     void OnPopUpCopy(wxCommandEvent& event);
 
-    // Refreshes the control to update label's position if necessary
-    void OnSize(wxSizeEvent& event);
-
-
     // overridden base class virtuals
 
     // Returns the best size for the window, which is the size needed
@@ -139,4 +131,4 @@ private:
     DECLARE_DYNAMIC_CLASS(wxGenericHyperlinkCtrl)
 };
 
-#endif // __GENERICHYPERLINKCTRLH__
+#endif // _WX_GENERICHYPERLINKCTRL_H_
index 573c18d178deae44d0ba73c7b6cd411c7a365c3b..f368ee3b32231c62b7eded0cbe98c602a53a8e1d 100644 (file)
@@ -62,6 +62,9 @@ bool wxGenericHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id,
     // do validation checks:
     CheckParams(label, url, style);
 
+    if ((style & wxHL_ALIGN_LEFT) == 0)
+        style |= wxFULL_REPAINT_ON_RESIZE;
+
     if (!wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name))
         return false;
 
@@ -94,7 +97,6 @@ bool wxGenericHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id,
     //       with GTK+'s native handling):
 
     Connect( wxEVT_PAINT, wxPaintEventHandler(wxGenericHyperlinkCtrl::OnPaint) );
-    Connect( wxEVT_SIZE, wxSizeEventHandler(wxGenericHyperlinkCtrl::OnSize) );
     Connect( wxEVT_LEAVE_WINDOW, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeaveWindow) );
 
     Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler(wxGenericHyperlinkCtrl::OnLeftDown) );
@@ -259,11 +261,4 @@ void wxGenericHyperlinkCtrl::OnPopUpCopy( wxCommandEvent& WXUNUSED(event) )
 #endif // wxUSE_CLIPBOARD
 }
 
-void wxGenericHyperlinkCtrl::OnSize(wxSizeEvent& WXUNUSED(event))
-{
-    // update the position of the label in the screen respecting
-    // the selected align flag
-    Refresh();
-}
-
 #endif // wxUSE_HYPERLINKCTRL