Skip to content

Commit

Permalink
#44: Added animation, fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sumershinde22 committed Jan 31, 2024
1 parent bea42ca commit 156ca40
Showing 1 changed file with 47 additions and 8 deletions.
55 changes: 47 additions & 8 deletions NERODevelopment/content/DetailDisplay.qml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Particles

Item {
Rectangle {
id: detailDisplay
property string shutdownFlowTask: "Task"
property string status: "null"
property string status: "CLEAR"
property bool ok: true
property bool clear: false
property bool clear: true
property bool highlight: true
height: 50
color: "black"

Row {
id: row
@@ -18,31 +20,68 @@ Item {

Rectangle {
id: taskDisplay
color: highlight ? "lightgrey" : "transparent"
width: parent.width / 2
Rectangle{
id: gradientBackground
rotation: -90
visible: highlight
anchors.centerIn: parent
width: parent.height
height: parent.width
radius: 10
gradient: Gradient {
GradientStop {
position: 0.0
SequentialAnimation on color {
loops: Animation.Infinite
ColorAnimation { from: "#969696"; to: "black"; duration: 5000 }
//ColorAnimation { from: "#0E1533"; to: "#14148c"; duration: 5000 }
ColorAnimation { from: "black"; to: "#969696"; duration: 5000 }
}
}
GradientStop {
position: 1.0
SequentialAnimation on color {
loops: Animation.Infinite
ColorAnimation { from: "black"; to: "#969696"; duration: 5000 }
//ColorAnimation { from: "#437284"; to: "#14aaff"; duration: 5000 }
ColorAnimation { from: "#969696"; to: "black"; duration: 5000 }
}
}
}
}

border.color: "transparent"
width: parent.width * 0.6
height: parent.height
radius: 10

LabelText {
id: taskText
color: "white"
text: detailDisplay.shutdownFlowTask
anchors.centerIn: parent
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
font.bold: false
font.family: "Roboto"
leftPadding: 10
}
}

Rectangle {
id: statusDisplay
color: clear ? "transparent" : (ok === true ? "#14FF00" : (ok === false ? "#FF0000" : "transparent"))
width: parent.width / 2
width: Math.max(parent.width * 0.4, statusText.implicitWidth + 20) // Ensure minimum width
height: parent.height
radius: 10
border.color: "white"
border.color: clear ? "white" : "transparent"
border.width: clear ? 3 : 0

LabelText {
id: statusText
visible: !clear
color: "black"
text: detailDisplay.status
font.family: "Roboto"
anchors.centerIn: parent
}
}

0 comments on commit 156ca40

Please sign in to comment.