+ using pv::view::View;
+
+ QFontMetrics m(QApplication::font());
+ const QSize text_size(
+ m.boundingRect(QRect(), 0, _name).width(),
+ m.boundingRect(QRect(), 0, "Tg").height());
+ const QSizeF label_size(
+ text_size.width() + View::LabelPadding.width() * 2,
+ ceilf((text_size.height() + View::LabelPadding.height() * 2) / 2) * 2);
+ const float half_height = label_size.height() / 2;
+ return QRectF(
+ right - half_height - label_size.width() - 0.5,
+ get_visual_y() + 0.5f - half_height,
+ label_size.width() + half_height,
+ label_size.height());