Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] depthaxis: add extended ticks #398

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
32 changes: 32 additions & 0 deletions qml/DepthAxis.qml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,30 @@ Item {
}
}

Component {
id: extendedTickMark
RowLayout {
anchors.right: parent.right
height: lastIndex ? remainingHeight() : nominalHeight()
width: root.width

Layout.fillHeight: true
Layout.alignment: Qt.AlignRight | Qt.AlignBottom

property var lastIndex: (index + 1) == numTicks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

===

Rectangle {
id: extendedTick
width: root.width
height: 1
Layout.alignment: Qt.AlignRight | Qt.AlignBottom
color: root.color
border.color: root.color
border.width: 1
visible: parent.height > 0
}
}
}

Component {
id: tickLabel
RowLayout {
Expand Down Expand Up @@ -124,6 +148,14 @@ Item {
}
}

Column {
anchors.fill:parent
Repeater {
model: numTicks
delegate: extendedTickMark
}
}

Column {
anchors.fill:parent
Repeater {
Expand Down
1 change: 1 addition & 0 deletions qml/Ping1DVisualizer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Item {
DepthAxis {
id: depthAxis
anchors.fill: parent
width: waterfall.width
start_mm: waterfall.minDepthToDraw
end_mm: waterfall.maxDepthToDraw
visible: start_mm != end_mm
Expand Down