← Back to team overview

ubuntu-sdk-team team mailing list archive

[Merge] lp:~daker/ubuntu-ui-toolkit/fix.1341559 into lp:ubuntu-ui-toolkit/staging

 

Adnane Belmadiaf has proposed merging lp:~daker/ubuntu-ui-toolkit/fix.1341559 into lp:ubuntu-ui-toolkit/staging.

Commit message:
Add count prop to OptionSelector

Requested reviews:
  Ubuntu SDK team (ubuntu-sdk-team)
Related bugs:
  Bug #1341559 in ubuntu-ui-toolkit (Ubuntu): "OptionSelector should have a count property like all the other model views"
  https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1341559

For more details, see:
https://code.launchpad.net/~daker/ubuntu-ui-toolkit/fix.1341559/+merge/317568

Add count prop to OptionSelector
-- 
Your team Ubuntu SDK team is requested to review the proposed merge of lp:~daker/ubuntu-ui-toolkit/fix.1341559 into lp:ubuntu-ui-toolkit/staging.
=== modified file 'components.api'
--- components.api	2017-01-26 11:59:45 +0000
+++ components.api	2017-02-17 00:40:38 +0000
@@ -740,6 +740,7 @@
     property var model
     property bool multiSelection
     property int selectedIndex
+    property int count
 Ubuntu.Components.OptionSelectorDelegate 1.0 0.1: Empty
     property color assetColour
     property bool colourImage

=== modified file 'src/imports/Components/1.3/OptionSelector.qml'
--- src/imports/Components/1.3/OptionSelector.qml	2016-08-22 10:18:57 +0000
+++ src/imports/Components/1.3/OptionSelector.qml	2017-02-17 00:40:38 +0000
@@ -155,6 +155,12 @@
     }
 
     /*!
+      \qmlproperty int count
+      This property holds the number of items in the OptionSelector.
+     */
+    property alias count: list.count
+
+    /*!
       \qmlproperty int selectedIndex
       The index of the currently selected element in our list.
      */


References