Mercurial > hg > easyhg
comparison src/colourset.cpp @ 400:07eaf4e6003a
Merge from branch "item_appearance_adjustments"
author | Chris Cannam |
---|---|
date | Wed, 25 May 2011 14:59:09 +0100 |
parents | a09d5ffe165c |
children | 533519ebc0cb |
comparison
equal
deleted
inserted
replaced
385:5cc0d897eb26 | 400:07eaf4e6003a |
---|---|
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; |