X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fgui%2Felistboxcontent.cpp;h=3dcea7b4f0ab310a60c453c60a2d45e20a695401;hp=ba0794e73ccb416fe85b22aab90e06e99f705ed1;hb=4911a0121954f6b6657ba28fab8d9dd9031d9a59;hpb=06d7275867f5737235100f50f3ad7d5ec2f526fc diff --git a/lib/gui/elistboxcontent.cpp b/lib/gui/elistboxcontent.cpp index ba0794e..3dcea7b 100644 --- a/lib/gui/elistboxcontent.cpp +++ b/lib/gui/elistboxcontent.cpp @@ -138,7 +138,7 @@ void eListboxPythonStringContent::setSize(const eSize &size) void eListboxPythonStringContent::paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected) { - ePtr fnt = new gFont("Regular", 20); + ePtr fnt; painter.clip(eRect(offset, m_itemsize)); style.setStyle(painter, selected ? eWindowStyle::styleListboxSelected : eWindowStyle::styleListboxNormal); @@ -151,6 +151,7 @@ void eListboxPythonStringContent::paint(gPainter &painter, eWindowStyle &style, if (local_style) { + fnt = local_style->m_font; if (selected) { /* if we have a local background color set, use that. */ @@ -170,6 +171,7 @@ void eListboxPythonStringContent::paint(gPainter &painter, eWindowStyle &style, painter.setForegroundColor(local_style->m_foreground_color); } } + if (!fnt) fnt = new gFont("Regular", 20); /* if we have no transparent background */ if (!local_style || !local_style->m_transparent_background) @@ -273,8 +275,8 @@ void eListboxPythonStringContent::invalidate() void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style, const ePoint &offset, int selected) { - ePtr fnt = new gFont("Regular", 20); - ePtr fnt2 = new gFont("Regular", 16); + ePtr fnt; + ePtr fnt2; eRect itemrect(offset, m_itemsize); eListboxStyle *local_style = 0; bool cursorValid = this->cursorValid(); @@ -288,6 +290,7 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style, if (local_style) { + fnt = local_style->m_font; if (selected) { /* if we have a local background color set, use that. */ @@ -308,6 +311,16 @@ void eListboxPythonConfigContent::paint(gPainter &painter, eWindowStyle &style, } } + if (fnt) + { + fnt2 = new gFont(fnt->family, fnt->pointSize - fnt->pointSize/5); + } + else + { + fnt = new gFont("Regular", 20); + fnt2 = new gFont("Regular", 16); + } + if (!local_style || !local_style->m_transparent_background) /* if we have no transparent background */ {