git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
real fix: set background color even when widget is transparent
[enigma2.git]
/
lib
/
gui
/
elistbox.cpp
diff --git
a/lib/gui/elistbox.cpp
b/lib/gui/elistbox.cpp
index dc735f85a391acdb8814daddf9e96fc092bafdbc..28d220a2dc20e74c5d4ab4b8351c8eca22e4a02d 100644
(file)
--- a/
lib/gui/elistbox.cpp
+++ b/
lib/gui/elistbox.cpp
@@
-10,6
+10,7
@@
eListbox::eListbox(eWidget *parent): eWidget(parent)
eActionMap::getInstance(ptr);
m_itemheight = 25;
eActionMap::getInstance(ptr);
m_itemheight = 25;
+ m_selection_enabled = 1;
ptr->bindAction("ListboxActions", 0, 0, this);
}
ptr->bindAction("ListboxActions", 0, 0, this);
}
@@
-142,9
+143,9
@@
int eListbox::event(int event, void *data, void *data2)
m_content->cursorSave();
m_content->cursorMove(m_top - m_selected);
m_content->cursorSave();
m_content->cursorMove(m_top - m_selected);
- for (int y = 0, i = 0; i < m_items_per_page; y += m_itemheight, ++i)
+ for (int y = 0, i = 0; i <
=
m_items_per_page; y += m_itemheight, ++i)
{
{
- m_content->paint(painter, *style, ePoint(0, y), m_selected == m_content->cursorGet() && m_content->size());
+ m_content->paint(painter, *style, ePoint(0, y), m_selected == m_content->cursorGet() && m_content->size()
&& m_selection_enabled
);
m_content->cursorMove(+1);
}
m_content->cursorMove(+1);
}
@@
-183,6
+184,14
@@
void eListbox::setItemHeight(int h)
recalcSize();
}
recalcSize();
}
+void eListbox::setSelectionEnable(int en)
+{
+ if (m_selection_enabled == en)
+ return;
+ m_selection_enabled = en;
+ entryChanged(m_selected); /* redraw current entry */
+}
+
void eListbox::entryAdded(int index)
{
/* manage our local pointers. when the entry was added before the current position, we have to advance. */
void eListbox::entryAdded(int index)
{
/* manage our local pointers. when the entry was added before the current position, we have to advance. */