diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-01-28 02:39:09 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-01-28 02:39:09 +0000 |
| commit | 8ade23537a682d4b0c9709d533b25702bde2ee23 (patch) | |
| tree | d558411192229a6ddb407b8b067658572b6a9e6b /lib/gui/ewindowstyle.cpp | |
| parent | 1a46b8d1505a1496dfdce0a9f96dde7efbc65d65 (diff) | |
| download | enigma2-8ade23537a682d4b0c9709d533b25702bde2ee23.tar.gz enigma2-8ade23537a682d4b0c9709d533b25702bde2ee23.zip | |
- add listbox
- add listbox example to python (press space, use 1..5)
- fix label text positions
Diffstat (limited to 'lib/gui/ewindowstyle.cpp')
| -rw-r--r-- | lib/gui/ewindowstyle.cpp | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/lib/gui/ewindowstyle.cpp b/lib/gui/ewindowstyle.cpp index 8599cfd7..64adfb58 100644 --- a/lib/gui/ewindowstyle.cpp +++ b/lib/gui/ewindowstyle.cpp @@ -57,17 +57,43 @@ void eWindowStyleSimple::paintBackground(gPainter &painter, const ePoint &offset painter.clear(); } -void eWindowStyleSimple::setForegroundStyle(gPainter &painter) +void eWindowStyleSimple::setStyle(gPainter &painter, int what) { - painter.setForegroundColor(gColor(0x1F)); + switch (what) + { + case styleLabel: + painter.setForegroundColor(gColor(0x1F)); + break; + case styleListboxSelected: + painter.setForegroundColor(gColor(0x1F)); + painter.setBackgroundColor(gColor(0x1A)); + break; + case styleListboxNormal: + painter.setForegroundColor(gColor(0x1C)); + painter.setBackgroundColor(m_background_color); + break; + } } -void eWindowStyleSimple::drawButtonFrame(gPainter &painter, const eRect &frame) +void eWindowStyleSimple::drawFrame(gPainter &painter, const eRect &frame, int what) { - painter.setForegroundColor(m_border_color_tl); + gColor c1, c2; + switch (what) + { + case frameButton: + c1 = m_border_color_tl; + c2 = m_border_color_br; + break; + case frameListboxEntry: + c1 = m_border_color_br; + c2 = m_border_color_tl; + break; + } + + painter.setForegroundColor(c2); painter.line(frame.topLeft1(), frame.topRight1()); painter.line(frame.topRight1(), frame.bottomRight1()); - painter.setForegroundColor(m_border_color_br); + painter.setForegroundColor(c1); painter.line(frame.bottomRight1(), frame.bottomLeft1()); painter.line(frame.bottomLeft1(), frame.topLeft1()); } |
