[Merge] lp:~phablet-team/ubuntu-ui-toolkit/ubuntu-ui-toolkit-progressbar-label into lp:ubuntu-ui-toolkit
Zsombor Egri
zsombor.egri at canonical.com
Tue Jun 17 13:49:19 UTC 2014
Review: Needs Fixing
See comments inline
Diff comments:
> === modified file 'examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml'
> --- examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml 2014-04-23 09:39:11 +0000
> +++ examples/ubuntu-ui-toolkit-gallery/ProgressBars.qml 2014-06-17 13:44:27 +0000
> @@ -15,7 +15,7 @@
> */
>
> import QtQuick 2.0
> -import Ubuntu.Components 0.1
> +import Ubuntu.Components 1.1
>
> Template {
> objectName: "progressBarsTemplate"
> @@ -53,6 +53,27 @@
> indeterminate: true
> }
> }
> +
> + TemplateRow {
> + title: i18n.tr("No label")
> +
> + ProgressBar {
> + id: progressNoLabel
> + objectName: "progressbar_nolabel"
> + width: parent.width
> + showProgressPercentage: false
> +
> + SequentialAnimation on value {
> + loops: Animation.Infinite
> + NumberAnimation {
> + from: progress.minimumValue
> + to: progress.maximumValue
> + duration: 2000
> + }
> + PauseAnimation {duration: 1000}
> + }
> + }
> + }
> }
>
> TemplateSection {
>
> === modified file 'modules/Ubuntu/Components/ProgressBar.qml'
> --- modules/Ubuntu/Components/ProgressBar.qml 2014-04-23 08:50:20 +0000
> +++ modules/Ubuntu/Components/ProgressBar.qml 2014-06-17 13:44:27 +0000
> @@ -16,31 +16,7 @@
>
> import QtQuick 2.0
>
> -/*!
> - \qmltype ProgressBar
> - \inqmlmodule Ubuntu.Components 1.1
> - \ingroup ubuntu
> - \brief The ProgressBar component visually indicates the progress of a process of
> - determinate or indeterminate duration.
> -
> - \b{This component is under heavy development.}
> -
> - Example:
> - \qml
> - Item {
> - ProgressBar {
> - id: indeterminateBar
> - indeterminate: true
> - }
> -
> - ProgressBar {
> - id: determinateBar
> - minimumValue: -3.0
> - maximumValue: 15
> - }
> - }
> - \endqml
> -*/
> +// Documentation in ProgressBar11.qml
Please revert the changes back, and add 1.1 related documentation in ProgressBar11.qdoc.
> AnimatedItem {
> id: progressBar
>
>
> === added file 'modules/Ubuntu/Components/ProgressBar11.qml'
> --- modules/Ubuntu/Components/ProgressBar11.qml 1970-01-01 00:00:00 +0000
> +++ modules/Ubuntu/Components/ProgressBar11.qml 2014-06-17 13:44:27 +0000
> @@ -0,0 +1,53 @@
> +/*
> + * Copyright 2013 Canonical Ltd.
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU Lesser General Public License as published by
> + * the Free Software Foundation; version 3.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public License
> + * along with this program. If not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +import QtQuick 2.0
> +
> +/*!
> + \qmltype ProgressBar
> + \inqmlmodule Ubuntu.Components 1.1
> + \ingroup ubuntu
> + \brief The ProgressBar component visually indicates the progress of a process of
> + determinate or indeterminate duration.
> +
> + \b{This component is under heavy development.}
> +
> + Example:
> + \qml
> + Item {
> + ProgressBar {
> + id: indeterminateBar
> + indeterminate: true
> + }
> +
> + ProgressBar {
> + id: determinateBar
> + minimumValue: -3.0
> + maximumValue: 15
> + }
> + }
> + \endqml
> +*/
> +ProgressBar {
> + id: progressBar
> +
> + /*!
> + Shows the current percentage of the progress
> + */
> + property bool showProgressPercentage: true
> +
> + style: Theme.createStyleComponent("ProgressBarStyle.qml", progressBar)
No need to load the style here.
> +}
>
> === modified file 'modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml'
> --- modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2014-04-23 08:50:20 +0000
> +++ modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2014-06-17 13:44:27 +0000
> @@ -56,6 +56,7 @@
> color: Theme.palette.normal.baseText
> text: progressBar.indeterminate ? i18n.tr("In Progress")
> : "%1%".arg(Number(progressBarStyle.progress * 100.0).toFixed(0))
> + visible: !progressBar.hasOwnProperty("showProgressPercentage") || progressBar.showProgressPercentage
>
> SequentialAnimation on opacity {
> loops: Animation.Infinite
> @@ -76,5 +77,6 @@
> rightColor: Theme.palette.normal.baseText
> progress: (progressBarStyle.progress * background.width - valueLabel.x) / valueLabel.width
> mirror: Qt.application.layoutDirection == Qt.RightToLeft
> + visible: !progressBar.hasOwnProperty("showProgressPercentage") || progressBar.showProgressPercentage
> }
> }
>
> === modified file 'modules/Ubuntu/Components/qmldir'
> --- modules/Ubuntu/Components/qmldir 2014-05-28 18:08:33 +0000
> +++ modules/Ubuntu/Components/qmldir 2014-06-17 13:44:27 +0000
> @@ -92,3 +92,4 @@
>
> #version 1.1
> ComboButton 1.1 ComboButton.qml
> +ProgressBar 1.1 ProgressBar11.qml
>
--
https://code.launchpad.net/~phablet-team/ubuntu-ui-toolkit/ubuntu-ui-toolkit-progressbar-label/+merge/223377
Your team Ubuntu Phablet Team is subscribed to branch lp:~phablet-team/ubuntu-ui-toolkit/ubuntu-ui-toolkit-progressbar-label.
More information about the Ubuntu-reviews
mailing list