Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/NotificationHeader.qml
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 37 | RowLayout { | |||
---|---|---|---|---|---|
59 | property real timeout: 5000 | 59 | property real timeout: 5000 | ||
60 | property real remainingTime: 0 | 60 | property real remainingTime: 0 | ||
61 | 61 | | |||
62 | signal configureClicked | 62 | signal configureClicked | ||
63 | signal dismissClicked | 63 | signal dismissClicked | ||
64 | signal closeClicked | 64 | signal closeClicked | ||
65 | 65 | | |||
66 | // notification created/updated time changed | 66 | // notification created/updated time changed | ||
67 | onTimeChanged: updateAgoText() | 67 | function onTimeChanged() { updateAgoText() } | ||
68 | 68 | | |||
69 | function updateAgoText() { | 69 | function updateAgoText() { | ||
70 | ageLabel.agoText = ageLabel.generateAgoText(); | 70 | ageLabel.agoText = ageLabel.generateAgoText(); | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | spacing: units.smallSpacing | 73 | spacing: units.smallSpacing | ||
74 | Layout.preferredHeight: Math.max(applicationNameLabel.implicitHeight, units.iconSizes.small) | 74 | Layout.preferredHeight: Math.max(applicationNameLabel.implicitHeight, units.iconSizes.small) | ||
75 | 75 | | |||
76 | Component.onCompleted: updateAgoText() | 76 | Component.onCompleted: updateAgoText() | ||
77 | 77 | | |||
78 | Connections { | 78 | Connections { | ||
79 | target: Globals | 79 | target: Globals | ||
80 | // clock time changed | 80 | // clock time changed | ||
81 | onTimeChanged: notificationHeading.updateAgoText() | 81 | function onTimeChanged() { notificationHeading.updateAgoText() } | ||
82 | } | 82 | } | ||
83 | 83 | | |||
84 | PlasmaCore.IconItem { | 84 | PlasmaCore.IconItem { | ||
85 | id: applicationIconItem | 85 | id: applicationIconItem | ||
86 | Layout.preferredWidth: units.iconSizes.small | 86 | Layout.preferredWidth: units.iconSizes.small | ||
87 | Layout.preferredHeight: units.iconSizes.small | 87 | Layout.preferredHeight: units.iconSizes.small | ||
88 | source: notificationHeading.applicationIconSource | 88 | source: notificationHeading.applicationIconSource | ||
89 | usesPlasmaTheme: false | 89 | usesPlasmaTheme: false | ||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |