use boundFunction from tools
[enigma2.git] / lib / gui / ewindowstyleskinned.cpp
index 55092e1daf5b413eee97cd8ce0af60feb928c884..20d508f6ed5e5a65fb5fd2ed0cc9891b2b21a3a4 100644 (file)
@@ -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)
@@ -248,3 +256,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;
+}
+