on xenial help sign in
Added comments to seemore and moved variable
commit7ef493499ff89c464dcbd1a4762e144d0d77b677 authorAndrea Cimitan <andrea.cimitan@gmail.com> dateTue 4 Feb 2014, 17:18 (13 years ago) parentd5d4958
2 files changed+8−5
qml/Components/SeeMore.qml+3 qml/Dash/Previews/PreviewTextSummary.qml+5−5
qml/Components/SeeMore.qml+3
@@ -17,7 +17,10 @@
1717import QtQuick 2.0
1818import Ubuntu.Components 0.1
1919
20+/*! Widget that can be used in combination with a text area to allow easy 'expand/collapse' functionality. */
21+
2022Item {
23+ /// type:bool Boolean set to true when it suggests expanded functionality
2124 property bool more: false
2225
2326 implicitHeight: seeMoreLabel.height + units.gu(2)
qml/Dash/Previews/PreviewTextSummary.qml+5−5
@@ -28,9 +28,6 @@ import "../../Components"
2828
2929PreviewWidget {
3030 id: root
31−
32− readonly property int __maximumCollapsedLineCount: 7
33−
3431 implicitHeight: titleLabel.visible ? titleLabel.height + textLabel.height : textLabel.height
3532
3633 Label {
@@ -52,12 +49,15 @@ PreviewWidget {
5249 Label {
5350 id: textLabel
5451 objectName: "textLabel"
52+
53+ readonly property int maximumCollapsedLineCount: 7
54+
5555 anchors {
5656 left: parent.left
5757 right: parent.right
5858 top: titleLabel.visible ? titleLabel.bottom : parent.top
5959 }
60− height: (!seeMore.visible || seeMore.more) ? contentHeight : contentHeight / lineCount * (__maximumCollapsedLineCount - 2)
60+ height: (!seeMore.visible || seeMore.more) ? contentHeight : contentHeight / lineCount * (maximumCollapsedLineCount - 2)
6161 clip: true
6262 fontSize: "medium"
6363 color: Theme.palette.selected.backgroundText
@@ -79,6 +79,6 @@ PreviewWidget {
7979 top: textLabel.bottom
8080 topMargin: units.gu(1)
8181 }
82− visible: textLabel.lineCount > __maximumCollapsedLineCount
82+ visible: textLabel.lineCount > textLabel.maximumCollapsedLineCount
8383 }
8484}