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);