From 0b02609ffee5661b06c195dfa601ef03a49b4c21 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 24 Sep 2009 16:46:50 +0000 Subject: [PATCH] Applied #11005: use purple instead of black as default wxHyperlinkCtrl::m_visitedColour git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/hyperlink.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/generic/hyperlink.cpp b/src/generic/hyperlink.cpp index 9b8497db8d..7b8a8a05cd 100644 --- a/src/generic/hyperlink.cpp +++ b/src/generic/hyperlink.cpp @@ -83,8 +83,8 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id, int alignment = (int)((style & wxHL_ALIGN_LEFT) != 0) + (int)((style & wxHL_ALIGN_CENTRE) != 0) + (int)((style & wxHL_ALIGN_RIGHT) != 0); - wxASSERT_MSG(alignment == 1, - wxT("Specify exactly one align flag!")); + wxASSERT_MSG(alignment == 1, + wxT("Specify exactly one align flag!")); #endif if (!wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name)) @@ -108,6 +108,7 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id, // colours m_normalColour = *wxBLUE; m_hoverColour = *wxRED; + m_visitedColour = wxColour(wxT("#551a8b")); SetForegroundColour(m_normalColour); // by default the font of an hyperlink control is underlined @@ -116,7 +117,7 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id, SetFont(f); SetInitialSize(size); - + return true; } @@ -205,7 +206,7 @@ void wxHyperlinkCtrl::OnLeftDown(wxMouseEvent& event) void wxHyperlinkCtrl::OnLeftUp(wxMouseEvent& event) { // the click must be started and ended in the hyperlink rect - if (!m_clicking || !GetLabelRect().Contains(event.GetPosition())) + if (!m_clicking || !GetLabelRect().Contains(event.GetPosition())) return; SetForegroundColour(m_visitedColour);