removed magic colors from node items and moved to css

This commit is contained in:
itsmattkc
2019-07-16 01:49:58 -04:00
parent d098c0de5f
commit 9d2fc71efc
6 changed files with 62 additions and 40 deletions
+7 -3
View File
@@ -30,9 +30,6 @@ NodeViewEdge::NodeViewEdge(QGraphicsItem *parent) :
QGraphicsLineItem(parent),
edge_(nullptr)
{
// FIXME: This should probably be set to the text color in order to work on light themes
setPen(QPen(Qt::white, 2));
// Ensures this UI object is drawn behind other objects
setZValue(-1);
}
@@ -71,6 +68,13 @@ void NodeViewEdge::Adjust()
));
}
void NodeViewEdge::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
setPen(QPen(widget->palette().color(QPalette::Text), 2));
QGraphicsLineItem::paint(painter, option, widget);
}
qreal NodeViewEdge::CalculateEdgeYPoint(NodeViewItem *item, int param_index, NodeViewItem *opposing)
{
if (item->IsExpanded()) {