6663b6c9
adorian
projet complet av...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <escher/even_odd_cell.h>
#include <escher/palette.h>
EvenOddCell::EvenOddCell() :
HighlightCell(),
m_even(false)
{
}
void EvenOddCell::setEven(bool even) {
if (even != m_even) {
m_even = even;
reloadCell();
}
}
KDColor EvenOddCell::backgroundColor() const {
// Select the background color according to the even line and the cursor selection
KDColor background = m_even ? KDColorWhite : Palette::WallScreen ;
background = isHighlighted() ? Palette::Select : background;
return background;
}
void EvenOddCell::drawRect(KDContext * ctx, KDRect rect) const {
KDColor background = backgroundColor();
ctx->fillRect(rect, background);
}
|