feat: add vector icons for transport controls, implement marker hover effects, and update dialog positioning
This commit is contained in:
@@ -10,6 +10,10 @@ Dialog {
|
||||
standardButtons: Dialog.NoButton
|
||||
width: 300
|
||||
|
||||
// Anchor to the top-left of the window instead of the default centered position.
|
||||
x: 24
|
||||
y: 24
|
||||
|
||||
// called by WaferMapView's TapHandler
|
||||
property int sensorIndex: -1
|
||||
property string sensorLabel: ""
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Controls.impl
|
||||
import QtQuick.Layouts
|
||||
import ISC
|
||||
|
||||
@@ -177,8 +178,6 @@ Item {
|
||||
implicitWidth: 56
|
||||
implicitHeight: 56
|
||||
hoverEnabled: true
|
||||
text: "⏮"
|
||||
font.pixelSize: 24
|
||||
background: Rectangle {
|
||||
radius: 8
|
||||
color: skipStartBtn.pressed ? Theme.transportButtonHover
|
||||
@@ -188,12 +187,13 @@ Item {
|
||||
ColorAnimation { duration: Theme.durationFast }
|
||||
}
|
||||
}
|
||||
contentItem: Text {
|
||||
text: parent.text
|
||||
contentItem: IconImage {
|
||||
source: "../icons/prev.svg"
|
||||
width: 22; height: 22
|
||||
sourceSize.width: 22
|
||||
sourceSize.height: 22
|
||||
color: Theme.headingColor
|
||||
font: parent.font
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
onClicked: streamController.step(-1)
|
||||
}
|
||||
@@ -205,8 +205,6 @@ Item {
|
||||
implicitWidth: 56
|
||||
implicitHeight: 56
|
||||
hoverEnabled: true
|
||||
text: "■"
|
||||
font.pixelSize: 22
|
||||
background: Rectangle {
|
||||
radius: 8
|
||||
color: reviewStopBtn.pressed ? Theme.transportButtonHover
|
||||
@@ -216,12 +214,13 @@ Item {
|
||||
ColorAnimation { duration: Theme.durationFast }
|
||||
}
|
||||
}
|
||||
contentItem: Text {
|
||||
text: parent.text
|
||||
contentItem: IconImage {
|
||||
source: "../icons/stop.svg"
|
||||
width: 20; height: 20
|
||||
sourceSize.width: 20
|
||||
sourceSize.height: 20
|
||||
color: Theme.headingColor
|
||||
font: parent.font
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
onClicked: streamController.stop()
|
||||
}
|
||||
@@ -233,8 +232,6 @@ Item {
|
||||
implicitWidth: 64
|
||||
implicitHeight: 56
|
||||
hoverEnabled: true
|
||||
text: streamController.playing ? "⏸" : "▶"
|
||||
font.pixelSize: 24
|
||||
background: Rectangle {
|
||||
radius: 8
|
||||
color: playPauseBtn.pressed ? Theme.transportButtonHover
|
||||
@@ -244,13 +241,13 @@ Item {
|
||||
ColorAnimation { duration: Theme.durationFast }
|
||||
}
|
||||
}
|
||||
contentItem: Text {
|
||||
text: parent.text
|
||||
contentItem: IconImage {
|
||||
source: streamController.playing ? "../icons/pause.svg" : "../icons/play.svg"
|
||||
width: 22; height: 22
|
||||
sourceSize.width: 22
|
||||
sourceSize.height: 22
|
||||
color: Theme.headingColor
|
||||
font: parent.font
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
leftPadding: parent.text === "▶" ? 4 : 0
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
onClicked: {
|
||||
if (streamController.playing) {
|
||||
@@ -268,8 +265,6 @@ Item {
|
||||
implicitWidth: 56
|
||||
implicitHeight: 56
|
||||
hoverEnabled: true
|
||||
text: "⏭"
|
||||
font.pixelSize: 24
|
||||
background: Rectangle {
|
||||
radius: 8
|
||||
color: skipEndBtn.pressed ? Theme.transportButtonHover
|
||||
@@ -279,12 +274,13 @@ Item {
|
||||
ColorAnimation { duration: Theme.durationFast }
|
||||
}
|
||||
}
|
||||
contentItem: Text {
|
||||
text: parent.text
|
||||
contentItem: IconImage {
|
||||
source: "../icons/next.svg"
|
||||
width: 22; height: 22
|
||||
sourceSize.width: 22
|
||||
sourceSize.height: 22
|
||||
color: Theme.headingColor
|
||||
font: parent.font
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
anchors.centerIn: parent
|
||||
}
|
||||
onClicked: streamController.step(1)
|
||||
}
|
||||
|
||||
@@ -29,6 +29,22 @@ Item {
|
||||
highColor: Theme.sensorHigh
|
||||
textColor: Theme.headingColor
|
||||
|
||||
// Grows the hovered marker smoothly; hoverScale setter triggers a repaint.
|
||||
hoverScale: 1.0 + 0.35 * hoverPulse
|
||||
property real hoverPulse: map.hoveredIndex >= 0 ? 1.0 : 0.0
|
||||
Behavior on hoverPulse {
|
||||
NumberAnimation { duration: 150; easing.type: Easing.OutQuad }
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
id: hoverHandler
|
||||
onPointChanged: {
|
||||
map.hoveredIndex = map.which_marker(hoverHandler.point.position.x, hoverHandler.point.position.y);
|
||||
}
|
||||
onHoveredChanged: if (!hoverHandler.hovered) map.hoveredIndex = -1
|
||||
cursorShape: map.hoveredIndex >= 0 ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
|
||||
TapHandler {
|
||||
onTapped: ev => {
|
||||
var idx = map.which_marker(ev.position.x, ev.position.y);
|
||||
|
||||
Reference in New Issue
Block a user