mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Visual clue chartbar tab has a menu
.. hover shows the menu indicator as subtly as possible, but will indicate to user there is a menu popup there as they hover.
This commit is contained in:
@@ -465,15 +465,23 @@ ChartBarItem::paintEvent(QPaintEvent *)
|
||||
if (checked) painter.fillRect(QRect(0,0,geometry().width(), 3*dpiXFactor), QBrush(GColor(CPLOTMARKER)));
|
||||
|
||||
// draw the menu indicator
|
||||
if (underMouse() && checked) {
|
||||
if (underMouse()) {
|
||||
|
||||
QPoint mouse = mapFromGlobal(QCursor::pos());
|
||||
QBrush brush(Qt::darkGray);
|
||||
painter.setPen (Qt :: NoPen);
|
||||
|
||||
// different color if under mouse
|
||||
if (hotspot.contains(mouse)) brush.setColor(GColor(CPLOTMARKER));
|
||||
painter.fillPath (triangle, brush);
|
||||
if (checked) {
|
||||
|
||||
// different color if under mouse
|
||||
QBrush brush(Qt::darkGray);
|
||||
if (hotspot.contains(mouse)) brush.setColor(GColor(CPLOTMARKER));
|
||||
painter.fillPath (triangle, brush);
|
||||
} else {
|
||||
|
||||
// visual clue there is a menu option when tab selected
|
||||
QBrush brush(Qt::lightGray);
|
||||
painter.fillPath (triangle, brush);
|
||||
}
|
||||
}
|
||||
painter.restore();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user