X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/78c828aae07db0b15a66577d9230cb848fe536fa..af5dfb0ec911f152f909530cf29c9e2ba74e2c1f:/lib/gui/ewindowstyleskinned.cpp diff --git a/lib/gui/ewindowstyleskinned.cpp b/lib/gui/ewindowstyleskinned.cpp index 55092e1d..a3cc3c5f 100644 --- a/lib/gui/ewindowstyleskinned.cpp +++ b/lib/gui/ewindowstyleskinned.cpp @@ -35,6 +35,14 @@ void eWindowStyleSkinned::handleNewSize(eWindow *wnd, eSize &size, eSize &offset void eWindowStyleSkinned::paintWindowDecoration(eWindow *wnd, gPainter &painter, const std::string &title) { drawBorder(painter, eRect(ePoint(0, 0), wnd->size()), m_border[bsWindow], bpAll); + + if (m_fnt) + { + painter.setBackgroundColor(m_color[colWindowTitleBackground]); + painter.setForegroundColor(m_color[colWindowTitleForeground]); + painter.setFont(m_fnt); + painter.renderText(eRect(m_title_offset.width(), m_title_offset.height(), wnd->size().width() - m_title_offset.width(), m_border[bsWindow].m_border_top - m_title_offset.height()), title); + } } void eWindowStyleSkinned::paintBackground(gPainter &painter, const ePoint &offset, const eSize &size) @@ -62,6 +70,10 @@ void eWindowStyleSkinned::setStyle(gPainter &painter, int what) painter.setForegroundColor(m_color[colListboxMarkedForeground]); painter.setBackgroundColor(m_color[colListboxMarkedBackground]); break; + case styleListboxMarkedAndSelected: + painter.setForegroundColor(m_color[colListboxMarkedAndSelectedForeground]); + painter.setBackgroundColor(m_color[colListboxMarkedAndSelectedBackground]); + break; } } @@ -188,13 +200,13 @@ RESULT eWindowStyleSkinned::getFont(int what, ePtr &fnt) switch (what) { case fontStatic: - fnt = new gFont("Arial", 12); + fnt = new gFont("Regular", 12); break; case fontButton: - fnt = new gFont("Arial", 20); + fnt = new gFont("Regular", 20); break; case fontTitlebar: - fnt = new gFont("Arial", 25); + fnt = new gFont("Regular", 25); break; default: return -1; @@ -248,3 +260,13 @@ void eWindowStyleSkinned::setColor(int what, const gRGB &col) m_color[what] = col; } +void eWindowStyleSkinned::setTitleOffset(const eSize &offset) +{ + m_title_offset = offset; +} + +void eWindowStyleSkinned::setTitleFont(gFont *fnt) +{ + m_fnt = fnt; +} +