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

Styled Progress bar for the Header item #2952

Merged
merged 1 commit into from
Dec 11, 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
3 changes: 2 additions & 1 deletion app/qml/components/MMProgressBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Rectangle {
id: control

required property real position // [0 - 1]
property color progressColor: __style.grassColor

width: parent.width
height: 12 * __dp
Expand All @@ -23,7 +24,7 @@ Rectangle {
Rectangle {
width: parent.width * control.position
height: parent.height
color: __style.grassColor
color: control.progressColor
radius: height / 2
}
}
71 changes: 54 additions & 17 deletions gallery/qml/pages/MiscPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,63 @@ Column {
padding: 20
spacing: 5

GroupBox {
title: "MMProgressBar"
background: Rectangle {
color: "white"
border.color: "gray"
}
label: Label {
color: "black"
text: parent.title
padding: 5
Row {
spacing: 5
GroupBox {
title: "MMProgressBar"
background: Rectangle {
color: "white"
border.color: "gray"
}
label: Label {
color: "black"
text: parent.title
padding: 5
}

Column {
spacing: 20
anchors.fill: parent
MMProgressBar {
position: 0
}
MMProgressBar {
position: 0.6
}
}
}

Column {
spacing: 20
anchors.fill: parent
MMProgressBar {
position: 0
GroupBox {
title: "MMProgressBar"
background: Rectangle {
color: "white"
border.color: "gray"
}
label: Label {
color: "black"
text: parent.title
padding: 5
}
MMProgressBar {
position: 0.4

Column {
spacing: 20
anchors.fill: parent
MMProgressBar {
width: 60 * __dp
height: 4 * __dp

position: 0
color: __style.grassColor
progressColor: __style.forestColor
}
MMProgressBar {
width: 60 * __dp
height: 4 * __dp

position: 0.6
color: __style.grassColor
progressColor: __style.forestColor
}
}
}
}
Expand Down