X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fbackgroundwidget.cc;h=4d1a51d0644053f645a2bb5dbcd96cb45f66fcf3;hb=5072931be0ff28cd9447926d50fe5ea202e2c370;hp=8b63b44d8781c76055af85d8115b9fa76cc52bc7;hpb=2ae2b257d39ea62640c2590f794e4275c6db1cd4;p=chaz%2Fopenbox diff --git a/src/backgroundwidget.cc b/src/backgroundwidget.cc index 8b63b44d..4d1a51d0 100644 --- a/src/backgroundwidget.cc +++ b/src/backgroundwidget.cc @@ -8,39 +8,39 @@ namespace ob { -OBBackgroundWidget::OBBackgroundWidget(otk::OtkWidget *parent, - OBWidget::WidgetType type) - : otk::OtkWidget(parent), - OBWidget(type) +BackgroundWidget::BackgroundWidget(otk::Widget *parent, + WidgetBase::WidgetType type) + : otk::Widget(parent), + WidgetBase(type) { } -OBBackgroundWidget::~OBBackgroundWidget() +BackgroundWidget::~BackgroundWidget() { } -void OBBackgroundWidget::setTextures() +void BackgroundWidget::setTextures() { switch (type()) { case Type_Titlebar: if (_focused) - setTexture(_style->getTitleFocus()); + setTexture(_style->titlebarFocusBackground()); else - setTexture(_style->getTitleUnfocus()); + setTexture(_style->titlebarUnfocusBackground()); break; case Type_Handle: if (_focused) - setTexture(_style->getHandleFocus()); + setTexture(_style->handleFocusBackground()); else - setTexture(_style->getHandleUnfocus()); + setTexture(_style->handleUnfocusBackground()); break; case Type_Plate: if (_focused) - setBorderColor(&_style->getFrameFocus()->color()); + setBorderColor(_style->clientBorderFocusColor()); else - setBorderColor(&_style->getFrameUnfocus()->color()); + setBorderColor(_style->clientBorderUnfocusColor()); break; default: assert(false); // there's no other background widgets! @@ -48,14 +48,14 @@ void OBBackgroundWidget::setTextures() } -void OBBackgroundWidget::setStyle(otk::Style *style) +void BackgroundWidget::setStyle(otk::RenderStyle *style) { - OtkWidget::setStyle(style); + Widget::setStyle(style); setTextures(); switch (type()) { case Type_Titlebar: case Type_Handle: - setBorderColor(_style->getBorderColor()); + setBorderColor(_style->frameBorderColor()); break; case Type_Plate: break; @@ -65,23 +65,23 @@ void OBBackgroundWidget::setStyle(otk::Style *style) } -void OBBackgroundWidget::focus() +void BackgroundWidget::focus() { - otk::OtkWidget::focus(); + otk::Widget::focus(); setTextures(); } -void OBBackgroundWidget::unfocus() +void BackgroundWidget::unfocus() { - otk::OtkWidget::unfocus(); + otk::Widget::unfocus(); setTextures(); } -void OBBackgroundWidget::adjust() +void BackgroundWidget::adjust() { - // XXX: adjust shit + // nothing to adjust here. its done in Frame::adjustSize } }