isCompatible with can now handle all frontend types
[enigma2.git] / lib / gui / ewindowstyleskinned.cpp
index 55092e1..20d508f 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;
+}
+