Ubuntu Pastebin

Paste from pobacke at Wed, 1 Mar 2017 14:25:32 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
=== modified file 'examples/ubuntu-ui-toolkit-gallery/Toggles.qml'
--- examples/ubuntu-ui-toolkit-gallery/Toggles.qml	2017-02-28 23:15:48 +0000
+++ examples/ubuntu-ui-toolkit-gallery/Toggles.qml	2017-03-01 14:11:33 +0000
@@ -94,7 +94,8 @@
             CheckBox {
                 objectName: "checkbox_checked_lbl"
                 checked: true
-                text: "This is a checkbox\nwith a label\nspanning several lines"
+                text: "This is a checkbox with a built-in label spanning several lines that won't be ellipsized but increase in height instead"
+                width: parent.width
             }
         }
     }

=== modified file 'src/imports/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml'
--- src/imports/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml	2017-02-28 23:15:48 +0000
+++ src/imports/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml	2017-03-01 14:24:41 +0000
@@ -56,8 +56,9 @@
      */
     property real iconPadding: units.gu(0.4)
 
-    implicitWidth: Math.max(styledItem.text ? units.gu(3) + checkBoxLbl.contentWidth : units.gu(2))
+    implicitWidth: units.gu(2)
     implicitHeight: Math.max(checkBoxLbl.contentHeight, units.gu(2))
+    clip: true
 
     FocusShape {}
 
@@ -170,8 +171,9 @@
         id: checkBoxLbl
         text: styledItem.text
         anchors.left: background.right
+        anchors.leftMargin: units.gu(1)
         anchors.right: parent.right
-        anchors.leftMargin: units.gu(1)
+        height: parent.height
         enabled: styledItem.enabled
         visible: styledItem.text
         wrapMode: Text.WordWrap
Download as text