X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/127c6c59e89dbdf96a93659104efd91428569a06..8d2545bc513280abe52d9c0fc2b704de3729a11e:/lib/gui/ewindowstyleskinned.cpp diff --git a/lib/gui/ewindowstyleskinned.cpp b/lib/gui/ewindowstyleskinned.cpp index a3cc3c5f..6357dcbd 100644 --- a/lib/gui/ewindowstyleskinned.cpp +++ b/lib/gui/ewindowstyleskinned.cpp @@ -214,6 +214,11 @@ RESULT eWindowStyleSkinned::getFont(int what, ePtr &fnt) return 0; } +void eWindowStyleSkinned::setPixmap(int bs, int bp, ePtr &ptr) +{ + setPixmap(bs, bp, *(ptr.operator->())); +} + void eWindowStyleSkinned::setPixmap(int bs, int bp, gPixmap &pixmap) { if ((bs >= bsMax) || (bs < 0)) @@ -240,18 +245,21 @@ void eWindowStyleSkinned::setPixmap(int bs, int bp, gPixmap &pixmap) if (m_border[bs].m_pixmap[i]) if (m_border[bs].m_border_bottom < m_border[bs].m_pixmap[i]->size().height()) m_border[bs].m_border_bottom = m_border[bs].m_pixmap[i]->size().height(); - for (int i = 0; i < 9; i += 3) - if (m_border[bs].m_pixmap[i]) - if (m_border[bs].m_border_left < m_border[bs].m_pixmap[i]->size().width()) - m_border[bs].m_border_left = m_border[bs].m_pixmap[i]->size().width(); - for (int i = 2; i < 9; i += 3) - if (m_border[bs].m_pixmap[i]) - if (m_border[bs].m_border_right < m_border[bs].m_pixmap[i]->size().width()) - m_border[bs].m_border_right = m_border[bs].m_pixmap[i]->size().width(); - eDebug("recalced border size for %d: %d:%d %d:%d", + + if (m_border[bs].m_pixmap[3]) + m_border[bs].m_border_left = m_border[bs].m_pixmap[3]->size().width(); + else + m_border[bs].m_border_left = 0; + + if (m_border[bs].m_pixmap[5]) + m_border[bs].m_border_right = m_border[bs].m_pixmap[5]->size().width(); + else + m_border[bs].m_border_right = 0; + +/* eDebug("recalced border size for %d: %d:%d %d:%d", bs, m_border[bs].m_border_left, m_border[bs].m_border_top, - m_border[bs].m_border_right, m_border[bs].m_border_bottom); + m_border[bs].m_border_right, m_border[bs].m_border_bottom); */ } void eWindowStyleSkinned::setColor(int what, const gRGB &col)