Public bug reported:

If a flickable only contains OptionSelector(s), the childrenRect isn't
refreshed, and so, the options when expanding aren't shown.

For instance:
import QtQuick 2.4
import Ubuntu.Components 1.2

MainView {
    id: mainview
    objectName: "mainView"
    applicationName: "foo.bar"

    width: units.gu(40)
    height: units.gu(75)

    Page {
        title: "Settings"
        Flickable {
            id: flick

            anchors.fill: parent
            contentHeight: column.height

            Column {
                id: column
                width: flick.width

                OptionSelector {
                    text: i18n.tr("Label")
                    model: [i18n.tr("Value 1"),
                            i18n.tr("Value 2"),
                            i18n.tr("Value 3"),
                            i18n.tr("Value 4")]
                }
            }
        }
    }
}

A workaround is to set a Label after the OptionSelector with an empty space as 
a text:
                Label {
                    text: " "
                }

** Affects: ubuntu-ui-toolkit (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: devexp

** Description changed:

  If a flickable only contains OptionSelector(s), the childrenRect isn't
  refreshed, and so, the options when expanding aren't shown.
  
  For instance:
+ import QtQuick 2.4
  import Ubuntu.Components 1.2
  
  MainView {
-     id: mainview
-     objectName: "mainView"
-     applicationName: "foo.bar"
+     id: mainview
+     objectName: "mainView"
+     applicationName: "foo.bar"
  
-     width: units.gu(40)
-     height: units.gu(75)
+     width: units.gu(40)
+     height: units.gu(75)
  
-     Page {
-         title: "Settings"
-         Flickable {
-             id: flick
+     Page {
+         title: "Settings"
+         Flickable {
+             id: flick
  
-             anchors.fill: parent
-             contentHeight: column.height
+             anchors.fill: parent
+             contentHeight: column.height
  
-             Column {
-                 id: column
-                 width: flick.width
+             Column {
+                 id: column
+                 width: flick.width
  
-                 OptionSelector {
-                     text: i18n.tr("Label")
-                     model: [i18n.tr("Value 1"),
-                             i18n.tr("Value 2"),
-                             i18n.tr("Value 3"),
-                             i18n.tr("Value 4")]
-                 }
-             }
-         }
-     }
+                 OptionSelector {
+                     text: i18n.tr("Label")
+                     model: [i18n.tr("Value 1"),
+                             i18n.tr("Value 2"),
+                             i18n.tr("Value 3"),
+                             i18n.tr("Value 4")]
+                 }
+             }
+         }
+     }
  }
  
  A workaround is to set a Label after the OptionSelector with an empty space 
as a text:
-                 Label {
-                     text: " "
-                 }
+                 Label {
+                     text: " "
+                 }

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1481624

Title:
  OptionSelector components in flickable doesn't show its expansion

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1481624/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to