all repos — openbox @ f77502100a32a6f875f33ef2ab01802f1cbc7c69

openbox fork - make it a bit more like ryudo

decorations work/line up/etc yay. now for fonts...
Dana Jansens danakj@orodu.net
commit

f77502100a32a6f875f33ef2ab01802f1cbc7c69

parent

36d8e0c6c49cb276cfa05e490a83356b4bcbefe0

1 files changed, 19 insertions(+), 12 deletions(-)

jump to
M src/frame.ccsrc/frame.cc

@@ -77,12 +77,21 @@ {

assert(style); otk::OtkWidget::setStyle(style); - // don't let grips change textures when they are pressed - _grip_left.setPressedFocusTexture(_grip_left.getTexture()); - _grip_left.setPressedUnfocusTexture(_grip_left.getUnfocusTexture()); - _grip_right.setPressedFocusTexture(_grip_right.getTexture()); - _grip_right.setPressedUnfocusTexture(_grip_right.getUnfocusTexture()); + // set the grips' textures + _grip_left.setTexture(style->getGripFocus()); + _grip_left.setUnfocusTexture(style->getGripUnfocus()); + _grip_left.setPressedFocusTexture(style->getGripFocus()); + _grip_left.setPressedUnfocusTexture(style->getGripUnfocus()); + _grip_right.setTexture(style->getGripFocus()); + _grip_right.setUnfocusTexture(style->getGripUnfocus()); + _grip_right.setPressedFocusTexture(style->getGripFocus()); + _grip_right.setPressedUnfocusTexture(style->getGripUnfocus()); + _titlebar.setTexture(style->getTitleFocus()); + _titlebar.setUnfocusTexture(style->getTitleUnfocus()); + _handle.setTexture(style->getHandleFocus()); + _handle.setUnfocusTexture(style->getHandleUnfocus()); + // if a style was previously set, then 'replace' is true, cause we're // replacing a style bool replace = (_style);

@@ -130,8 +139,8 @@ bwidth = _style->getBorderWidth();

cbwidth = _style->getFrameWidth(); } else bwidth = cbwidth = 0; - _size.left = _size.top = _size.bottom = _size.right = bwidth + cbwidth; - width = _client->area().width() + (bwidth + cbwidth) * 2; + _size.left = _size.top = _size.bottom = _size.right = cbwidth; + width = _client->area().width() + cbwidth * 2; XSetWindowBorderWidth(otk::OBDisplay::display, _plate.getWindow(), cbwidth);

@@ -186,9 +195,8 @@ // the size of the label. this ASSUMES the layout has only buttons other

// that the ONE LABEL!! // adds an extra sep so that there's a space on either side of the // titlebar.. note: x = sep, below. - _label.setWidth(_label.width() - - ((_button_iconify.width() + sep) * - (layout.size() - 1) + sep * 2)); + _label.setWidth(width - sep * 2 - + (_button_iconify.width() + sep) * (layout.size() - 1)); int x = sep; for (int i = 0, len = layout.size(); i < len; ++i) {

@@ -222,8 +230,7 @@ }

if (_decorations & OBClient::Decor_Handle) { _handle.setGeometry(-bwidth, - _size.top + _client->area().height() + - _style->getFrameWidth(), + _size.top + _client->area().height() + cbwidth, width, _style->getHandleWidth()); _grip_left.setGeometry(-bwidth, -bwidth,