[DEV] correct the scrolling and remove display of hiden element in the list
This commit is contained in:
parent
dd373e1d2d
commit
84769bc26e
@ -188,30 +188,27 @@ void ewol::widget::List::onRegenerateDisplay() {
|
|||||||
// -------------------------------------------------------
|
// -------------------------------------------------------
|
||||||
for (int_t yyy=0; yyy<matrixSize.y(); ++yyy) {
|
for (int_t yyy=0; yyy<matrixSize.y(); ++yyy) {
|
||||||
float startYposition = m_size.y() + m_originScrooled.y() - listStartPosY[yyy];
|
float startYposition = m_size.y() + m_originScrooled.y() - listStartPosY[yyy];
|
||||||
/*
|
|
||||||
if (startYposition + m_listSizeY[yyy] < 0) {
|
if (startYposition + m_listSizeY[yyy] < 0) {
|
||||||
// ==> element out of range ==> nothing to display
|
// ==> element out of range ==> nothing to display
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
if (startYposition > m_size.y()) {
|
if (startYposition > m_size.y()) {
|
||||||
// ==> element out of range ==> nothing to display
|
// ==> element out of range ==> nothing to display
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
for (int_t xxx=0; xxx<matrixSize.x(); ++xxx) {
|
for (int_t xxx=0; xxx<matrixSize.x(); ++xxx) {
|
||||||
float startXposition = m_originScrooled.x() + listStartPosX[xxx];
|
float startXposition = -m_originScrooled.x() + listStartPosX[xxx];
|
||||||
/*
|
//EWOL_ERROR("display start: " << startXposition);
|
||||||
if (startYposition + m_listSizeX[xxx] < 0) {
|
if (startXposition + m_listSizeX[xxx] < 0) {
|
||||||
// ==> element out of range ==> nothing to display
|
// ==> element out of range ==> nothing to display
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (startYposition > m_size.x()) {
|
if (startXposition > m_size.x()) {
|
||||||
// ==> element out of range ==> nothing to display
|
// ==> element out of range ==> nothing to display
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
drawElement(ivec2(xxx, yyy),
|
drawElement(ivec2(xxx, yyy),
|
||||||
vec2(m_paddingSizeX + listStartPosX[xxx], startYposition),
|
vec2(startXposition, startYposition),
|
||||||
vec2(m_listSizeX[xxx], m_listSizeY[yyy]));
|
vec2(m_listSizeX[xxx], m_listSizeY[yyy]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user