decorations work/line up/etc yay. now for fonts...

This commit is contained in:
Dana Jansens 2002-12-03 07:47:51 +00:00
parent 36d8e0c6c4
commit f77502100a

View file

@ -77,11 +77,20 @@ void OBFrame::setStyle(otk::Style *style)
assert(style); assert(style);
otk::OtkWidget::setStyle(style); otk::OtkWidget::setStyle(style);
// don't let grips change textures when they are pressed // set the grips' textures
_grip_left.setPressedFocusTexture(_grip_left.getTexture()); _grip_left.setTexture(style->getGripFocus());
_grip_left.setPressedUnfocusTexture(_grip_left.getUnfocusTexture()); _grip_left.setUnfocusTexture(style->getGripUnfocus());
_grip_right.setPressedFocusTexture(_grip_right.getTexture()); _grip_left.setPressedFocusTexture(style->getGripFocus());
_grip_right.setPressedUnfocusTexture(_grip_right.getUnfocusTexture()); _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 // if a style was previously set, then 'replace' is true, cause we're
// replacing a style // replacing a style
@ -130,8 +139,8 @@ void OBFrame::adjust()
cbwidth = _style->getFrameWidth(); cbwidth = _style->getFrameWidth();
} else } else
bwidth = cbwidth = 0; bwidth = cbwidth = 0;
_size.left = _size.top = _size.bottom = _size.right = bwidth + cbwidth; _size.left = _size.top = _size.bottom = _size.right = cbwidth;
width = _client->area().width() + (bwidth + cbwidth) * 2; width = _client->area().width() + cbwidth * 2;
XSetWindowBorderWidth(otk::OBDisplay::display, _plate.getWindow(), cbwidth); XSetWindowBorderWidth(otk::OBDisplay::display, _plate.getWindow(), cbwidth);
@ -186,9 +195,8 @@ void OBFrame::adjust()
// that the ONE LABEL!! // that the ONE LABEL!!
// adds an extra sep so that there's a space on either side of the // adds an extra sep so that there's a space on either side of the
// titlebar.. note: x = sep, below. // titlebar.. note: x = sep, below.
_label.setWidth(_label.width() - _label.setWidth(width - sep * 2 -
((_button_iconify.width() + sep) * (_button_iconify.width() + sep) * (layout.size() - 1));
(layout.size() - 1) + sep * 2));
int x = sep; int x = sep;
for (int i = 0, len = layout.size(); i < len; ++i) { for (int i = 0, len = layout.size(); i < len; ++i) {
@ -222,8 +230,7 @@ void OBFrame::adjust()
if (_decorations & OBClient::Decor_Handle) { if (_decorations & OBClient::Decor_Handle) {
_handle.setGeometry(-bwidth, _handle.setGeometry(-bwidth,
_size.top + _client->area().height() + _size.top + _client->area().height() + cbwidth,
_style->getFrameWidth(),
width, _style->getHandleWidth()); width, _style->getHandleWidth());
_grip_left.setGeometry(-bwidth, _grip_left.setGeometry(-bwidth,
-bwidth, -bwidth,