Mercurial > hg > easyhg
comparison src/colourset.cpp @ 395:a09d5ffe165c item_appearance_adjustments
Make colour selection for branches and authors more headache-inducing^W^Wcheerful
author | Chris Cannam |
---|---|
date | Tue, 24 May 2011 17:59:18 +0100 |
parents | b9c153e00e84 |
children | 533519ebc0cb |
comparison
equal
deleted
inserted
replaced
394:27757ce9c76c | 395:a09d5ffe165c |
---|---|
36 if (m_colours.contains(n)) return m_colours[n]; | 36 if (m_colours.contains(n)) return m_colours[n]; |
37 | 37 |
38 QColor c; | 38 QColor c; |
39 | 39 |
40 if (m_colours.empty()) { | 40 if (m_colours.empty()) { |
41 c = QColor::fromHsv(0, 200, 100); | 41 c = QColor::fromHsv(0, 200, 150); |
42 } else { | 42 } else { |
43 c = QColor::fromHsv((m_lastColour.hue() + 70) % 360, 200, 100); | 43 int hue = m_lastColour.hue() - 130; |
44 if (hue < 0) hue += 360; | |
45 c = QColor::fromHsv(hue, 200, 150); | |
44 } | 46 } |
45 | 47 |
46 m_colours[n] = c; | 48 m_colours[n] = c; |
47 m_lastColour = c; | 49 m_lastColour = c; |
48 return c; | 50 return c; |