mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Tweak hover label a bit - remove it on leave and don't clip both sides
This commit is contained in:
@@ -231,6 +231,11 @@ void TimelineBar::wheelEvent(QWheelEvent *e)
|
||||
layout();
|
||||
}
|
||||
|
||||
void TimelineBar::leaveEvent(QEvent *e)
|
||||
{
|
||||
viewport()->update();
|
||||
}
|
||||
|
||||
void TimelineBar::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
QPainter p(viewport());
|
||||
@@ -303,7 +308,8 @@ void TimelineBar::paintEvent(QPaintEvent *e)
|
||||
p.drawLine(hoverRect.topLeft(), hoverRect.bottomLeft());
|
||||
p.drawLine(hoverRect.topRight(), hoverRect.bottomRight());
|
||||
|
||||
// round down the width for clipping against labels below
|
||||
// shrink the rect a bit for clipping against labels below
|
||||
hoverRect.setX(qRound(hoverRect.x() + 0.5));
|
||||
hoverRect.setWidth(int(hoverRect.width()));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -52,6 +52,7 @@ protected:
|
||||
void mouseReleaseEvent(QMouseEvent *e) override;
|
||||
void mouseMoveEvent(QMouseEvent *e) override;
|
||||
void wheelEvent(QWheelEvent *e) override;
|
||||
void leaveEvent(QEvent *e) override;
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user