- x += 2;
-
- int w = getMaxTextWidth(pain,this);
- int h = ascent(pain,f) + descent(pain,f);
-
- pain.rectangle(int(x), baseline - ascent(pain, f), w, h, framecolor);
-
- x += 4;
- drawTextXOffset = int(x) - top_x;
- InsetText::draw(pain, f, baseline, x);
+ x -= TEXT_TO_INSET_OFFSET;
+
+ int w = InsetText::width(pain, f) + (2 * TEXT_TO_INSET_OFFSET);
+ int h = ascent(pain,f) + descent(pain, f);
+ int save_x = static_cast<int>(x);
+ x += TEXT_TO_INSET_OFFSET;
+ InsetText::draw(bv, f, baseline, x, cleared);
+ pain.rectangle(save_x, baseline - ascent(pain, f), w, h, framecolor);