various fixes to the otk widgets
Dana Jansens danakj@orodu.net
7 files changed,
20 insertions(+),
6 deletions(-)
M
otk/Makefile.am
→
otk/Makefile.am
@@ -27,7 +27,8 @@ focuslabel.hh focuswidget.hh font.hh label.hh otk.hh \
point.hh property.hh pseudorendercontrol.hh rect.hh \ rendercolor.hh rendercontrol.hh renderstyle.hh \ rendertexture.hh screeninfo.hh strut.hh surface.hh \ - timer.hh truerendercontrol.hh ustring.hh util.hh widget.hh + timer.hh truerendercontrol.hh ustring.hh util.hh widget.hh \ + ../config.h libotk_la_LDFLAGS = $(XFT_LIBS) $(PYTHON_LIBS) @LIBS@ MAINTAINERCLEANFILES= Makefile.in
M
otk/appwidget.cc
→
otk/appwidget.cc
@@ -26,10 +26,19 @@ Atom protocols[2];
protocols[0] = Property::atoms.wm_protocols; protocols[1] = Property::atoms.wm_delete_window; XSetWMProtocols(**display, window(), protocols, 2); + + setStyle(_style); } AppWidget::~AppWidget() { +} + +void AppWidget::setStyle(RenderStyle *style) +{ + Widget::setStyle(style); + + setTexture(style->titlebarUnfocusBackground()); } void AppWidget::show(void)
M
otk/appwidget.hh
→
otk/appwidget.hh
@@ -15,6 +15,8 @@ AppWidget(Application *app, Direction direction = Horizontal,
Cursor cursor = 0, int bevel_width = 1); virtual ~AppWidget(); + virtual void setStyle(RenderStyle *style); + virtual void show(void); virtual void hide(void);
M
otk/focuslabel.cc
→
otk/focuslabel.cc
@@ -58,7 +58,7 @@ if (h > _rect.height())
internalResize(w, h); else internalResize(w, _rect.height()); - } else + } else if (h > _rect.height()) internalResize(_rect.width(), h); } FocusWidget::update();
M
otk/focuswidget.cc
→
otk/focuswidget.cc
@@ -53,6 +53,8 @@ void FocusWidget::setTexture(RenderTexture *texture)
{ Widget::setTexture(texture); _focus_texture = texture; + if (!_focused) + Widget::setTexture(_unfocus_texture); } void FocusWidget::setBorderColor(const RenderColor *color)
M
otk/label.cc
→
otk/label.cc
@@ -54,7 +54,7 @@ if (h > _rect.height())
internalResize(w, h); else internalResize(w, _rect.height()); - } else + } else if (h > _rect.height()) internalResize(_rect.width(), h); } Widget::update();