git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add early version of DVDBurn plugin. Basic functionality is working, but it needs...
[enigma2.git]
/
lib
/
gui
/
eslider.cpp
diff --git
a/lib/gui/eslider.cpp
b/lib/gui/eslider.cpp
index 9dd21d0af9e045d4e7736b3be8b52bea732f6454..dd2aac9e73c329b9f3eb64ad73ae30c84263719b 100644
(file)
--- a/
lib/gui/eslider.cpp
+++ b/
lib/gui/eslider.cpp
@@
-1,10
+1,21
@@
#include <lib/gui/eslider.h>
eSlider::eSlider(eWidget *parent)
#include <lib/gui/eslider.h>
eSlider::eSlider(eWidget *parent)
- :eWidget(parent), m_
orientation(orHorizontal), m_start(0), m_border_width(0), m_have_border_color(false
)
+ :eWidget(parent), m_
have_border_color(false), m_start(0), m_orientation(orHorizontal), m_border_width(0
)
{
}
{
}
+void eSlider::setPixmap(ePtr<gPixmap> &pixmap)
+{
+ setPixmap(pixmap.operator->());
+}
+
+void eSlider::setPixmap(gPixmap *pixmap)
+{
+ m_pixmap = pixmap;
+ event(evtChangedSlider);
+}
+
void eSlider::setBorderWidth(int pixel)
{
m_border_width=pixel;
void eSlider::setBorderWidth(int pixel)
{
m_border_width=pixel;
@@
-25,14
+36,20
@@
int eSlider::event(int event, void *data, void *data2)
case evtPaint:
{
ePtr<eWindowStyle> style;
case evtPaint:
{
ePtr<eWindowStyle> style;
- gPainter &painter = *(gPainter*)data2;
eSize s(size());
eSize s(size());
-
getStyle(style);
getStyle(style);
- style->paintBackground(painter, ePoint(0,0), s);
+ /* paint background */
+ eWidget::event(evtPaint, data, data2);
+
+ gPainter &painter = *(gPainter*)data2;
+
style->setStyle(painter, eWindowStyle::styleLabel); // TODO - own style
style->setStyle(painter, eWindowStyle::styleLabel); // TODO - own style
- painter.fill(m_currently_filled);
+
+ if (!m_pixmap)
+ painter.fill(m_currently_filled);
+ else
+ painter.blit(m_pixmap, ePoint(0, 0), m_currently_filled.extends, isTransparent() ? gPainter::BT_ALPHATEST : 0);
// border
if (m_have_border_color)
// border
if (m_have_border_color)