Indeterminate progress bar styling
This commit is contained in:
parent
6cdd6de1b3
commit
28dd35fc1b
1
TODO.md
1
TODO.md
|
@ -58,7 +58,6 @@
|
||||||
- UI
|
- UI
|
||||||
- Show error if uploading avatar fails or file is corrupted
|
- Show error if uploading avatar fails or file is corrupted
|
||||||
- Way to open context menus without a right mouse button
|
- Way to open context menus without a right mouse button
|
||||||
- Indeterminate progress bar
|
|
||||||
- `smartVerticalFlick()` gradual acceleration
|
- `smartVerticalFlick()` gradual acceleration
|
||||||
|
|
||||||
- Link previews
|
- Link previews
|
||||||
|
|
|
@ -18,9 +18,19 @@ ProgressBar {
|
||||||
implicitHeight: theme.controls.progressBar.height
|
implicitHeight: theme.controls.progressBar.height
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: bar.visualPosition * parent.width
|
id: indicator
|
||||||
|
width: bar.indeterminate ?
|
||||||
|
parent.width / 8 : bar.visualPosition * parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
color: foregroundColor
|
color: foregroundColor
|
||||||
|
|
||||||
|
XAnimator on x {
|
||||||
|
running: indeterminate
|
||||||
|
duration: theme.animationDuration * 8
|
||||||
|
from: 0
|
||||||
|
to: bar.width - indicator.width
|
||||||
|
onStopped: {[from, to] = [to, from]; start()}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ Rectangle {
|
||||||
|
|
||||||
HProgressBar {
|
HProgressBar {
|
||||||
id: progressBar
|
id: progressBar
|
||||||
|
indeterminate: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user