limit underline to rect width
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
#include "sequenceparams.h"
|
||||
|
||||
SequenceParams::SequenceParams()
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef SEQUENCEPARAMS_H
|
||||
#define SEQUENCEPARAMS_H
|
||||
|
||||
|
||||
class SequenceParams
|
||||
{
|
||||
public:
|
||||
SequenceParams();
|
||||
};
|
||||
|
||||
#endif // SEQUENCEPARAMS_H
|
||||
@@ -100,7 +100,7 @@ void TimelineViewBlockItem::paint(QPainter *painter, const QStyleOptionGraphicsI
|
||||
// Linked clips are underlined
|
||||
if (block_->HasLinks()) {
|
||||
QFontMetrics fm = painter->fontMetrics();
|
||||
int text_width = QFontMetricsWidth(fm, block_->block_name());
|
||||
int text_width = qMin(qRound(rect().width()), QFontMetricsWidth(fm, block_->block_name()));
|
||||
|
||||
QPointF underline_start = rect().topLeft() + QPointF(0, fm.height());
|
||||
QPointF underline_end = underline_start + QPointF(text_width, 0);
|
||||
|
||||
Reference in New Issue
Block a user