Skip to content

Commit

Permalink
Added Warning Page
Browse files Browse the repository at this point in the history
  • Loading branch information
Ace-Krypton committed Aug 15, 2023
1 parent c0e0a3e commit 1e08f0a
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt.user
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 QtCreator 11.0.0, 2023-08-15T19:37:26. -->
<!-- Written by QtCreator 11.0.0, 2023-08-15T19:53:17. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down
4 changes: 2 additions & 2 deletions qml/MainPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Item {
property string currentWallpaper: "../img/default.jpg"

Warning {
width: 500
height: 500
width: 550
height: 220
}

Connections {
Expand Down
74 changes: 57 additions & 17 deletions qml/Warning.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,77 @@ Dialog {
spacing: 10
width: parent.width

Text {
wrapMode: Text.WordWrap
width: parent.width - 10
font.family: "Montserrat"
color: "red"
RowLayout {
spacing: 5

Item {
width: 24
height: 24

Image {
source: "file:///home/draco/Downloads/warning(1).png"
anchors.fill: parent
}
}

Text {
anchors.topMargin: 10
text: "Warning: Continuous storage benchmarking may lead to decreased lifespan and performance of your storage device."
wrapMode: Text.WordWrap
font.family: "Montserrat"
Layout.preferredWidth: warningDialog.width - 24
font.bold: true
}
}

Rectangle {
height: 10
width: 10
color: "transparent"
}

Rectangle {
x: 4
width: warningDialog.width - 24
height: textItem.implicitHeight
color: "transparent"

RowLayout {
spacing: 5

Item {
width: 24
height: 24
width: 16
height: 16

Image {
source: "file:///home/draco/Downloads/warning(1).png"
source: "file:///home/draco/Downloads/information-button(1).png"
anchors.fill: parent
}
}

Text {
text: "Warning: Continuous storage benchmarking can lead to decreased lifespan and performance of your storage device."
wrapMode: Text.WordWrap
Rectangle {
x: 2
width: warningDialog.width - 24
height: textItem.implicitHeight
color: "transparent"

Text {
anchors.fill: parent
id: textItem
text: "Please use this benchmarking tool responsibly and avoid excessive or prolonged benchmarking sessions on important storage devices."
wrapMode: Text.WordWrap
font.family: "Montserrat"
Layout.preferredWidth: warningDialog.width - 24
font.bold: true
}
}
}
}

Text {
text: "Please use this benchmarking tool responsibly and avoid excessive or prolonged benchmarking sessions on important storage devices."
wrapMode: Text.WordWrap
width: parent.width - 10
font.family: "Montserrat"
Rectangle {
height: 10
width: 10
color: "transparent"
}

CheckBox {
Expand All @@ -56,7 +96,7 @@ Dialog {
}

RowLayout {
spacing: 10
spacing: 30
anchors.horizontalCenter: parent.horizontalCenter

Button {
Expand Down

0 comments on commit 1e08f0a

Please sign in to comment.