Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qml/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ int QmlGuiMain(int argc, char* argv[])
}, Qt::QueuedConnection);
QObject::connect(&init_executor, &QmlInitExecutor::runawayException, &node_model, &NodeModel::handleRunawayException);

NetworkTrafficTower network_traffic_tower{node_model};
NetworkTrafficTower network_traffic_tower{*node};
NetworkStatusModel network_status_model;
#ifdef __ANDROID__
AndroidNotifier android_notifier{node_model};
Expand Down
6 changes: 3 additions & 3 deletions qml/components/NetworkTrafficGraph.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Item {
id: root
property alias backgroundColor: trafficGraph.backgroundColor
property alias borderColor: trafficGraph.borderColor
property alias fillColor: trafficGraph.fillColor
property alias fillColor: trafficGraph.gradientColor
property alias lineColor: trafficGraph.lineColor
property alias markerLineColor: trafficGraph.markerLineColor
property alias maxSamples: trafficGraph.maxSamples
Expand All @@ -31,7 +31,7 @@ Item {
width: root.width
backgroundColor: root.backgroundColor
borderColor: root.borderColor
fillColor: root.fillColor
gradientColor: root.fillColor
lineColor: root.lineColor
markerLineColor: root.markerLineColor
maxSamples: root.maxSamples
Expand All @@ -46,7 +46,7 @@ Item {
ColorAnimation { duration: 150 }
}

Behavior on fillColor {
Behavior on gradientColor {
ColorAnimation { duration: 150 }
}

Expand Down
10 changes: 5 additions & 5 deletions qml/controls/linegraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
LineGraph::LineGraph(QQuickItem *parent)
: QQuickPaintedItem(parent)
{
setFillColor(m_background_color);
setGradientColor(m_background_color);
}

void LineGraph::setBackgroundColor(QColor color)
{
m_background_color = color;
setFillColor(color);
setGradientColor(color);
}

void LineGraph::setBorderColor(QColor color)
Expand All @@ -32,9 +32,9 @@ void LineGraph::setBorderColor(QColor color)
update();
}

void LineGraph::setFillColor(QColor color)
void LineGraph::setGradientColor(QColor color)
{
m_fill_color = color;
m_gradient_color = color;
update();
}

Expand Down Expand Up @@ -135,7 +135,7 @@ void LineGraph::paintTraffic(QPainter * painter)
void LineGraph::setupGradient(QPainterPath * painter_path)
{
QLinearGradient gradient(painter_path->boundingRect().topLeft(), painter_path->boundingRect().bottomLeft());
gradient.setColorAt(0, QColor(m_fill_color.red(), m_fill_color.green(), m_fill_color.blue(), 191));
gradient.setColorAt(0, QColor(m_gradient_color.red(), m_gradient_color.green(), m_gradient_color.blue(), 191));
gradient.setColorAt(1, QColor("transparent"));
m_fill_gradient = gradient;
}
Expand Down
8 changes: 4 additions & 4 deletions qml/controls/linegraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class LineGraph : public QQuickPaintedItem
Q_OBJECT
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor)
Q_PROPERTY(QColor fillColor READ fillColor WRITE setFillColor)
Q_PROPERTY(QColor gradientColor READ gradientColor WRITE setGradientColor)
Q_PROPERTY(QColor lineColor READ lineColor WRITE setLineColor)
Q_PROPERTY(QColor markerLineColor READ markerLineColor WRITE setMarkerLineColor)
Q_PROPERTY(int maxSamples READ maxSamples WRITE setMaxSamples)
Expand All @@ -29,7 +29,7 @@ class LineGraph : public QQuickPaintedItem

QColor backgroundColor() const { return m_background_color; };
QColor borderColor() const { return m_border_color; };
QColor fillColor() const { return m_fill_color; };
QColor gradientColor() const { return m_gradient_color; };
QColor lineColor() const { return m_line_color; };
QColor markerLineColor() const { return m_marker_line_color; };
int maxSamples() const { return m_max_samples; };
Expand All @@ -39,7 +39,7 @@ class LineGraph : public QQuickPaintedItem
public Q_SLOTS:
void setBackgroundColor(QColor color);
void setBorderColor(QColor color);
void setFillColor(QColor color);
void setGradientColor(QColor color);
void setLineColor(QColor color);
void setMarkerLineColor(QColor color);
void setMaxSamples(int max_samples);
Expand All @@ -55,7 +55,7 @@ class LineGraph : public QQuickPaintedItem

QColor m_background_color{"#2D2D2D"};
QColor m_border_color{"#000000"};
QColor m_fill_color{"#000000"};
QColor m_gradient_color{"#000000"};
QLinearGradient m_fill_gradient{0, 0, 0, 0};
QColor m_line_color{"#000000"};
QColor m_marker_line_color{"#000000"};
Expand Down
Loading
Loading