qml: mempool histogram color bar: show tooltips
to teach meanings of colours and positions in the bar
This commit is contained in:
@@ -91,6 +91,13 @@ Pane {
|
||||
Layout.fillWidth: true
|
||||
height: parent.height
|
||||
color: Qt.hsva(2/3-(2/3*(Math.log(Math.min(600, modelData[0]))/Math.log(600))), 0.8, 1, 1)
|
||||
ToolTip.text: modelData[0] + " sat/vB around depth " + (modelData[2]/1000000).toFixed(2) + " MB"
|
||||
ToolTip.visible: ma.containsMouse
|
||||
MouseArea {
|
||||
id: ma
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,11 @@ class QENetwork(QObject, QtEventListener):
|
||||
break
|
||||
slot = min(item[1], bytes_limit-bytes_current)
|
||||
bytes_current += slot
|
||||
capped_histogram.append([max(FEERATE_DEFAULT_RELAY/1000, item[0]), slot]) # clamped to [FEERATE_DEFAULT_RELAY/1000,inf]
|
||||
capped_histogram.append([
|
||||
max(FEERATE_DEFAULT_RELAY/1000, item[0]), # clamped to [FEERATE_DEFAULT_RELAY/1000,inf[
|
||||
slot, # width of bucket
|
||||
bytes_current, # cumulative depth at far end of bucket
|
||||
])
|
||||
|
||||
# add clamping attributes for the GUI
|
||||
self._fee_histogram = {
|
||||
|
||||
Reference in New Issue
Block a user