}\r
\r
void CGitLogListBase::paintGraphLane(HDC hdc, int laneHeight,int type, int x1, int x2,\r
- const COLORREF& col,int top\r
+ const COLORREF& col,const COLORREF& activeColor, int top\r
) \r
{\r
int h = laneHeight / 2;\r
\r
std::vector<int>& lanes=data->m_Lanes;\r
UINT laneNum = lanes.size();\r
- UINT mergeLane = 0;\r
+ UINT activeLane = 0;\r
for (UINT i = 0; i < laneNum; i++)\r
if (Lanes::isMerge(lanes[i])) {\r
- mergeLane = i;\r
+ activeLane = i;\r
break;\r
}\r
\r
int x1 = 0, x2 = 0;\r
int maxWidth = rect.Width();\r
int lw = 3 * rect.Height() / 4; //laneWidth() \r
+\r
+ COLORREF activeColor = m_LineColors[activeLane % Lanes::COLORS_NUM];\r
+ //if (opt.state & QStyle::State_Selected)\r
+ // activeColor = blend(activeColor, opt.palette.highlightedText().color(), 208);\r
+ \r
+\r
+ for (unsigned int i = 0; i < laneNum && x2 < maxWidth; i++) \r
+ {\r
+\r
+ x1 = x2;\r
+ x2 += lw;\r
+\r
+ int ln = lanes[i];\r
+ if (ln == Lanes::EMPTY)\r
+ continue;\r
+\r
+ COLORREF color = i == activeLane ? activeColor : m_LineColors[i % Lanes::COLORS_NUM];\r
+ paintGraphLane(hdc, rect.Height(),ln, x1, x2, color,activeColor, rect.top);\r
+ }\r
+\r
+#if 0\r
for (UINT i = 0; i < laneNum && x2 < maxWidth; i++) {\r
\r
x1 = x2;\r
continue;\r
\r
UINT col = ( Lanes:: isHead(ln) ||Lanes:: isTail(ln) || Lanes::isJoin(ln)\r
- || ln ==Lanes:: CROSS_EMPTY) ? mergeLane : i;\r
+ || ln ==Lanes:: CROSS_EMPTY) ? activeLane : i;\r
\r
if (ln == Lanes::CROSS) {\r
paintGraphLane(hdc, rect.Height(),Lanes::NOT_ACTIVE, x1, x2, m_LineColors[col % Lanes::COLORS_NUM],rect.top);\r
- paintGraphLane(hdc, rect.Height(),Lanes::CROSS, x1, x2, m_LineColors[mergeLane % Lanes::COLORS_NUM],rect.top);\r
+ paintGraphLane(hdc, rect.Height(),Lanes::CROSS, x1, x2, m_LineColors[activeLane % Lanes::COLORS_NUM],rect.top);\r
} else\r
paintGraphLane(hdc, rect.Height(),ln, x1, x2, m_LineColors[col % Lanes::COLORS_NUM],rect.top);\r
}\r
+#endif\r
\r
TRACE(_T("index %d %d\r\n"),index,data->m_Lanes.size());\r
}\r
\r
BOOL GetShortName(CString ref, CString &shortname,CString prefix);\r
void paintGraphLane(HDC hdc,int laneHeight, int type, int x1, int x2,\r
- const COLORREF& col,int top) ; \r
+ const COLORREF& col,const COLORREF& activeColor, int top) ; \r
void DrawLine(HDC hdc, int x1, int y1, int x2, int y2){::MoveToEx(hdc,x1,y1,NULL);::LineTo(hdc,x2,y2);}\r
/**\r
* Save column widths to the registry\r