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

#22 Direction Component #28

Merged
merged 3 commits into from
Oct 14, 2023
Merged
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
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"
}
}
}
}