mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.

Home Page:http://mixxx.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

End of track warning on Waveform overview is incomplet when Waveform display is hiden

RafaelFrance opened this issue · comments

Bug Description

Tango skin

Waveform end of track warning

When Waveform display is disabled, the top border of warning "end of track" is not visible.
No probleme when Waveform display is enabled.

Version

2.5-beta-13-gc6d1d5f691

OS

Windows 11 Professionnal version 23H2

For me, with 100% app scaling (both Mixxx and system), it looks like this:
image
Yes, there is some rounding issue or whatever in the paint code that makes the top border thinner than the other borders.

That issue seems to be magnified when Mixxx is scaled (by the OS in your case, as you screenshot indicates, is it 125% or even 150%?).

The paint code is here.

void WOverview::drawEndOfTrackFrame(QPainter* pPainter) {
if (m_endOfTrack) {
PainterScope painterScope(pPainter);
pPainter->setOpacity(0.8);
pPainter->setPen(QPen(QBrush(m_endOfTrackColor), 1.5 * m_scaleFactor));
pPainter->setBrush(QColor(0, 0, 0, 0));
pPainter->drawRect(rect().adjusted(0, 0, -1, -1));
}
}

The border width is 1.5 * scale factor, and the rectangle's bottom right point is shifted back inside the view box. This is to compensate for

QPainter::drawRect(const QRectF &rectangle)
Draws the current rectangle with the current pen and brush.
A filled rectangle has a size of rectangle.size(). A stroked rectangle has a size of rectangle.size() plus the pen width.

So the stroke overlaps the widget at the top and left by [stroke width / 2] but at the bottom, due to shifting, it overlaps less, hence the border appears to be drawn with different widths.
Though, I don't fully understand why this eliminates the top border entirely.

I'll take a look.

OS is at 100%. Screenshot was at this scale.

Hmm no.
This is your screenshot where I've put mine on top. Your cover art is 138x138 px, mine is 111x111 (100%), so your GUI is scaled to 125%. In your screenshot you can also see thin black borders around it that usually stem from scaling rounding offsets.
image