Changeset View
Changeset View
Standalone View
Standalone View
discover/qml/UpdatesPage.qml
Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Line(s) | 175 | delegate: Kirigami.Heading { | |||
---|---|---|---|---|---|
176 | x: Kirigami.Units.gridUnit | 176 | x: Kirigami.Units.gridUnit | ||
177 | level: 2 | 177 | level: 2 | ||
178 | text: section | 178 | text: section | ||
179 | height: implicitHeight + Kirigami.Units.largeSpacing * 2 | 179 | height: implicitHeight + Kirigami.Units.largeSpacing * 2 | ||
180 | } | 180 | } | ||
181 | } | 181 | } | ||
182 | 182 | | |||
183 | delegate: Kirigami.AbstractListItem { | 183 | delegate: Kirigami.AbstractListItem { | ||
184 | id: listItem | ||||
184 | backgroundColor: Kirigami.Theme.backgroundColor | 185 | backgroundColor: Kirigami.Theme.backgroundColor | ||
185 | highlighted: ListView.isCurrentItem | 186 | highlighted: ListView.isCurrentItem | ||
186 | onEnabledChanged: if (!enabled) { | 187 | onEnabledChanged: if (!enabled) { | ||
187 | layout.extended = false; | 188 | layout.extended = false; | ||
188 | } | 189 | } | ||
189 | 190 | | |||
190 | visible: resourceState < 3 //3=AbstractBackendUpdater.Done | 191 | visible: resourceState < 3 //3=AbstractBackendUpdater.Done | ||
191 | 192 | | |||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 225 | ColumnLayout { | |||
233 | 234 | | |||
234 | // Old and new version numbers; show when there's enough room | 235 | // Old and new version numbers; show when there's enough room | ||
235 | Label { | 236 | Label { | ||
236 | id: oldAndNewVersions | 237 | id: oldAndNewVersions | ||
237 | Layout.fillWidth: true | 238 | Layout.fillWidth: true | ||
238 | elide: Text.ElideRight | 239 | elide: Text.ElideRight | ||
239 | text: i18n("%1 → %2", installedVersion, availableVersion) | 240 | text: i18n("%1 → %2", installedVersion, availableVersion) | ||
240 | visible: !truncated | 241 | visible: !truncated | ||
242 | opacity: listItem.hovered? 0.8 : 0.6 | ||||
241 | } | 243 | } | ||
242 | // Available version only, for when old+new would be elided. | 244 | // Available version only, for when old+new would be elided. | ||
243 | // Use squeezey text to gain more room, and if it's still so | 245 | // Use squeezey text to gain more room, and if it's still so | ||
244 | // so long that it would be elided, elide from the left so | 246 | // so long that it would be elided, elide from the left so | ||
245 | // the most important part on the right is still visible | 247 | // the most important part on the right is still visible | ||
246 | 248 | | |||
247 | // All of this is mostly for the benefit of KDE Neon users, | 249 | // All of this is mostly for the benefit of KDE Neon users, | ||
248 | // since the version strings there are really really long | 250 | // since the version strings there are really really long | ||
249 | Label { | 251 | Label { | ||
250 | Layout.fillWidth: true | 252 | Layout.fillWidth: true | ||
251 | elide: Text.ElideLeft | 253 | elide: Text.ElideLeft | ||
252 | text: availableVersion | 254 | text: availableVersion | ||
253 | visible: !oldAndNewVersions.visible | 255 | visible: !oldAndNewVersions.visible | ||
254 | font.letterSpacing: -0.5 | 256 | font.letterSpacing: -0.5 | ||
257 | opacity: listItem.hovered? 0.8 : 0.6 | ||||
255 | } | 258 | } | ||
256 | } | 259 | } | ||
257 | 260 | | |||
258 | LabelBackground { | 261 | LabelBackground { | ||
259 | Layout.minimumWidth: Kirigami.Units.gridUnit * 6 | 262 | Layout.minimumWidth: Kirigami.Units.gridUnit * 6 | ||
260 | text: resourceState == 2 ? i18n("Installing") : size | 263 | text: resourceState == 2 ? i18n("Installing") : size | ||
261 | 264 | | |||
262 | progress: resourceProgress/100 | 265 | progress: resourceProgress/100 | ||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |