get the size of the label properly
This commit is contained in:
parent
9c6ce2a800
commit
e828f1404f
1 changed files with 8 additions and 2 deletions
10
src/frame.cc
10
src/frame.cc
|
@ -184,6 +184,14 @@ void OBFrame::update()
|
||||||
// possible letter, all of the letters are valid, and L exists somewhere in
|
// possible letter, all of the letters are valid, and L exists somewhere in
|
||||||
// the string!
|
// 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;
|
int x = sep;
|
||||||
for (int i = 0, len = layout.size(); i < len; ++i) {
|
for (int i = 0, len = layout.size(); i < len; ++i) {
|
||||||
otk::Rect *area;
|
otk::Rect *area;
|
||||||
|
@ -216,8 +224,6 @@ void OBFrame::update()
|
||||||
continue; // just to fuck with g++
|
continue; // just to fuck with g++
|
||||||
}
|
}
|
||||||
area->setX(x);
|
area->setX(x);
|
||||||
if (layout[i] != 'L')
|
|
||||||
_label_area.setWidth(_label_area.width() - area->width());
|
|
||||||
x += sep + area->width();
|
x += sep + area->width();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue