summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-11-10 12:58:29 +0000
committerDana Jansens <danakj@orodu.net>2002-11-10 12:58:29 +0000
commite828f1404fbd9ee430cf6839024c5051866cbf3a (patch)
tree5fd467e3204a41000386c738fb008fe463fbff85
parent9c6ce2a8001ee62982853cf7475feeb6145ecf95 (diff)
get the size of the label properly
-rw-r--r--src/frame.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/frame.cc b/src/frame.cc
index d70dad01..b802889a 100644
--- a/src/frame.cc
+++ b/src/frame.cc
@@ -184,6 +184,14 @@ void OBFrame::update()
// possible letter, all of the letters are valid, and L exists somewhere in
// the string!
+ // 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_area.setWidth(_label_area.width() -
+ ((_button_iconify_area.width() + sep) *
+ (layout.size() - 1) + sep));
+
int x = sep;
for (int i = 0, len = layout.size(); i < len; ++i) {
otk::Rect *area;
@@ -216,8 +224,6 @@ void OBFrame::update()
continue; // just to fuck with g++
}
area->setX(x);
- if (layout[i] != 'L')
- _label_area.setWidth(_label_area.width() - area->width());
x += sep + area->width();
}
}