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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user