Skip to content

Commit

Permalink
Refs #1, Improving the UI: progress bars hidden until needed
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevPavelmc committed Feb 19, 2019
1 parent 14eb372 commit 2fe2261
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions skyflash/data/skyflash.qml
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ ApplicationWindow {
ProgressBar {
id: pbDownload
Layout.fillWidth: true
visible: true
visible: false
maximumValue: 100
minimumValue: 0
value: 0.1
Expand Down Expand Up @@ -350,7 +350,7 @@ ApplicationWindow {
// image progress bars
ColumnLayout {
id: buildProgressBars
visible: true
visible: false

// particular image progress
RowLayout{
Expand Down Expand Up @@ -521,10 +521,18 @@ ApplicationWindow {

// receiving the percent of the download
onDProg: {
// make it visible if not already
if (pbDownload.visible == false) {
pbDownload.visible = true
}

// set percent
if (percent > 0) {
// set value
pbDownload.indeterminate = false
pbDownload.value = percent
} else {
// set indeterminate state
pbDownload.indeterminate = true
}
}
Expand Down Expand Up @@ -561,7 +569,6 @@ ApplicationWindow {
onBuildImages: {
// set next step visible
boxBuild.visible = true
buildProgressBars.visible = true
}

// status bar messages
Expand Down Expand Up @@ -602,13 +609,25 @@ ApplicationWindow {

// build single image progress
onBsProg: {
// make bars visible
if (buildProgressBars.visible == false) {
buildProgressBars.visible = true
}

// set percent
if (percent > 0) {
pbBuildSingle.value = percent
}
}

// build overall image progress
onBoProg: {
// make bars visible
if (buildProgressBars.visible == false) {
buildProgressBars.visible = true
}

// set percent
if (percent > 0) {
pbBuildOverall.value = percent
}
Expand Down

0 comments on commit 2fe2261

Please sign in to comment.