1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +01:00

Improved look&feel in dark styles

This commit is contained in:
Martin Tůma 2019-01-04 19:21:05 +01:00
parent e983562f38
commit e5685035da
3 changed files with 6 additions and 4 deletions

View File

@ -111,10 +111,11 @@ void AxisItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QFontMetrics fm(_font); QFontMetrics fm(_font);
QRect ts; QRect ts;
painter->setRenderHint(QPainter::Antialiasing, false); painter->setRenderHint(QPainter::Antialiasing, false);
painter->setFont(_font); painter->setFont(_font);
painter->setPen(QPen(Qt::black, AXIS_WIDTH)); QPen pen(painter->pen());
pen.setWidth(AXIS_WIDTH);
painter->setPen(pen);
if (_type == X) { if (_type == X) {
painter->drawLine(0, 0, _size, 0); painter->drawLine(0, 0, _size, 0);

View File

@ -27,7 +27,6 @@ GraphView::GraphView(QWidget *parent)
_scene = new QGraphicsScene(this); _scene = new QGraphicsScene(this);
setScene(_scene); setScene(_scene);
setBackgroundBrush(QBrush(Qt::white));
setViewportUpdateMode(QGraphicsView::FullViewportUpdate); setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
setRenderHint(QPainter::Antialiasing, true); setRenderHint(QPainter::Antialiasing, true);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

View File

@ -49,7 +49,9 @@ void SliderInfoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem
} }
painter->setPen(Qt::NoPen); painter->setPen(Qt::NoPen);
painter->setBrush(QBrush(QColor(255, 255, 255, 196))); QColor bc(painter->background().color());
bc.setAlpha(196);
painter->setBrush(QBrush(bc));
painter->drawRect(ry); painter->drawRect(ry);
painter->drawRect(rx); painter->drawRect(rx);
painter->setBrush(Qt::NoBrush); painter->setBrush(Qt::NoBrush);