- if (!owner())
- x += scroll();
-
- LyXFont font(params_.labelfont);
- font.realize(LyXFont(LyXFont::ALL_SANE));
- font.decSize();
- font.decSize();
- int w = 0;
- int a = 0;
- int d = 0;
- font_metrics::rectText(params_.type, font, w, a, d);
- pi.pain.rectText(x + (dim_.wid - w) / 2,
- y + inset.descent() + a,
- params_.type, font, LColor::none, LColor::none);
+ LyXFont font(params_.labelfont);
+ font.realize(LyXFont(LyXFont::ALL_SANE));
+ font.decSize();
+ font.decSize();
+ int w = 0;
+ int a = 0;
+ int d = 0;
+ font_metrics::rectText(params_.type, font, w, a, d);
+ pi.pain.rectText(x + (dim_.wid - w) / 2, y + desc + a,
+ params_.type, font, LColor::none, LColor::none);
+ }
+
+ // a visual clue when the cursor is inside the inset
+ LCursor & cur = pi.base.bv->cursor();
+ if (cur.isInside(this)) {
+ y -= ascent();
+ pi.pain.line(x, y + 4, x, y, params_.labelfont.color());
+ pi.pain.line(x + 4, y, x, y, params_.labelfont.color());
+ pi.pain.line(x + dim_.wid - 2, y + 4, x + dim_.wid - 2, y,
+ params_.labelfont.color());
+ pi.pain.line(x + dim_.wid - 6, y, x + dim_.wid - 2, y,
+ params_.labelfont.color());