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)
painter.setForegroundColor(m_color[colListboxMarkedForeground]);
painter.setBackgroundColor(m_color[colListboxMarkedBackground]);
break;
+ case styleListboxMarkedAndSelected:
+ painter.setForegroundColor(m_color[colListboxMarkedAndSelectedForeground]);
+ painter.setBackgroundColor(m_color[colListboxMarkedAndSelectedBackground]);
+ break;
}
}
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;
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();
+
+ 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_color[what] = col;
}
+void eWindowStyleSkinned::setTitleOffset(const eSize &offset)
+{
+ m_title_offset = offset;
+}
+
+void eWindowStyleSkinned::setTitleFont(gFont *fnt)
+{
+ m_fnt = fnt;
+}
+