Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/JobDetails.qml
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 59 | PlasmaExtras.DescriptiveLabel { | |||
---|---|---|---|---|---|
60 | id: descriptionValueLabel | 60 | id: descriptionValueLabel | ||
61 | Layout.column: 1 | 61 | Layout.column: 1 | ||
62 | Layout.row: index | 62 | Layout.row: index | ||
63 | Layout.fillWidth: true | 63 | Layout.fillWidth: true | ||
64 | font: theme.smallestFont | 64 | font: theme.smallestFont | ||
65 | elide: Text.ElideMiddle | 65 | elide: Text.ElideMiddle | ||
66 | textFormat: Text.PlainText | 66 | textFormat: Text.PlainText | ||
67 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere | 67 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere | ||
68 | verticalAlignment: Text.AlignTop | ||||
68 | maximumLineCount: 5 | 69 | maximumLineCount: 5 | ||
69 | visible: text !== "" | 70 | visible: text !== "" | ||
70 | 71 | | |||
72 | // Only let the label grow, never shrink, to avoid repeatedly resizing the dialog when copying many files | ||||
73 | onImplicitHeightChanged: { | ||||
74 | if (implicitHeight > Layout.preferredHeight) { | ||||
75 | Layout.preferredHeight = implicitHeight; | ||||
76 | } | ||||
77 | } | ||||
78 | | ||||
71 | Component.onCompleted: bindText() | 79 | Component.onCompleted: bindText() | ||
72 | function bindText() { | 80 | function bindText() { | ||
73 | text = Qt.binding(function() { | 81 | text = Qt.binding(function() { | ||
74 | return jobDetails["descriptionLabel" + modelData] && jobDetails["descriptionValue" + modelData] | 82 | return jobDetails["descriptionLabel" + modelData] && jobDetails["descriptionValue" + modelData] | ||
75 | ? jobDetails["descriptionValue" + modelData] : ""; | 83 | ? jobDetails["descriptionValue" + modelData] : ""; | ||
76 | }); | 84 | }); | ||
77 | } | 85 | } | ||
78 | 86 | | |||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |