Skip to content

Commit

Permalink
Merge pull request #28 from Northeastern-Electric-Racing/#22-Make-Dir…
Browse files Browse the repository at this point in the history
…ection-Component

#22 Direction Component
  • Loading branch information
Peyton-McKee authored Oct 14, 2023
2 parents 865b6db + 1599e87 commit d6d74f6
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion NERODesign/NERO.qmlproject.qtds
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtDesignStudio 4.2.0, 2023-08-28T18:50:08. -->
<!-- Written by QtDesignStudio 4.2.0, 2023-10-11T19:01:36. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down
49 changes: 49 additions & 0 deletions NERODesign/content/DirectionView.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.0

Item {
property int width: 1920
property int height: 1080
property bool forward: true

RowLayout {
id: rowLayout
anchors.fill: parent
spacing: 20
Rectangle {
id: rectangle
color: forward ? "#7CFC00" : "transparent"
Layout.fillHeight: true
Layout.preferredWidth: parent.width/2 - 10
border.color: forward ? "transparent" : "white" // Outline color
border.width: 5 // Outline width
radius: 50 // Border radius to round the corners


Text {
anchors.centerIn: parent
font.pixelSize: Math.min(parent.width, parent.height)
text: "F"
color: "white"
}
}

Rectangle {
id: rectangle1
color: forward ? "transparent" : "Red"
Layout.fillHeight: true
Layout.preferredWidth: parent.width / 2 - 20
border.color: forward ? "white" : "transparent" // Outline color
border.width: 5 // Outline width
radius: 50 // Border radius to round the corners

Text {
anchors.centerIn: parent
font.pixelSize: Math.min(parent.width, parent.height)
color: "white"
text: "R"
}
}
}
}

0 comments on commit d6d74f6

Please sign in to comment.