- if (_dirty) {
- const BFont &ft = getStyle()->getFont();
- unsigned int bevel = getStyle()->getBevelWidth();
-
- std::string t = _text; // the actual text to draw
- int x = bevel; // x coord for the text
-
- // find a string that will fit inside the area for text
- int max_length = width() - getBevelWidth() * 2;
- if (max_length <= 0) {
- t = ""; // can't fit anything
- } else {
- size_t text_len = t.size();
- int length;
+ otk::Widget::renderForeground();
+
+ const Font *ft = style()->labelFont();
+ unsigned int sidemargin = style()->bevelWidth() * 2;
+
+ ustring t = _text; // the actual text to draw
+ int x = sidemargin; // x coord for the text
+
+ // find a string that will fit inside the area for text
+ int max_length = width() - sidemargin * 2;
+ if (max_length <= 0) {
+ t = ""; // can't fit anything
+ } else {
+ size_t text_len = t.size();
+ int length;