← Back to team overview

ubuntu-phone team mailing list archive

Re: Thin progress bar

 

On Thu, May 14, 2015 at 11:26 PM, Roman Shchekin <mrqtros@xxxxxxxxx> wrote:
> Guys, use simple rectangle for this, it will be easier and faster than any
> component. Or just copy mine:
>
> http://bazaar.launchpad.net/~mrqtros/yad/trunk/view/head:/components/MiniProgressBar.qml
>
> 2015-05-14 20:52 GMT+03:00 Marco Trevisan <marco.trevisan@xxxxxxxxxxxxx>:
>>
>> Il 14/05/2015 18:08, Sam Bull ha scritto:
>> > There is a thin progress bar displayed at the top of webapps when
>> > loading. What component is this? I would like to use this in my app.
>> > I've also noticed Dekko has the same style bar for its activity
>> > indicator.
>>
>> It's just a squeezed normal progressbar:
>>
>> ProgressBar {
>>     anchors.top: parent.top
>>     anchors.left: parent.left
>>     anchors.right: parent.right
>>     height: units.dp(3)
>>     showProgressPercentage: false
>>     visible: root.loading
>>     value: root.loadProgress / 100
>> }

By not using the standard ProgressBar component, you are re-inventing
the wheel (fun but useless) and more importantly you are loosing
theming consistency.

The code for the thin progress bar used by the browser and webapps is
there: http://bazaar.launchpad.net/~phablet-team/webbrowser-app/trunk/view/head:/src/app/ThinProgressBar.qml


References