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
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)
{
Widget::show(true);
Cursor cursor = 0, int bevel_width = 1);
virtual ~AppWidget();
+ virtual void setStyle(RenderStyle *style);
+
virtual void show(void);
virtual void hide(void);
{
if (_pressed) return;
- if (_pressed_focus_tx)
- FocusWidget::setTexture(_pressed_focus_tx);
if (_pressed_unfocus_tx)
FocusWidget::setUnfocusTexture(_pressed_unfocus_tx);
+ if (_pressed_focus_tx)
+ FocusWidget::setTexture(_pressed_focus_tx);
_pressed = true;
_mouse_button = mouse_button;
}
{
if (_mouse_button != mouse_button) return; // wrong button
- FocusWidget::setTexture(_unpr_focus_tx);
FocusWidget::setUnfocusTexture(_unpr_unfocus_tx);
+ FocusWidget::setTexture(_unpr_focus_tx);
_pressed = false;
}
internalResize(w, h);
else
internalResize(w, _rect.height());
- } else
+ } else if (h > _rect.height())
internalResize(_rect.width(), h);
}
FocusWidget::update();
{
Widget::setTexture(texture);
_focus_texture = texture;
+ if (!_focused)
+ Widget::setTexture(_unfocus_texture);
}
void FocusWidget::setBorderColor(const RenderColor *color)
internalResize(w, h);
else
internalResize(w, _rect.height());
- } else
+ } else if (h > _rect.height())
internalResize(_rect.width(), h);
}
Widget::update();