Commit 1d28d910 authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈 Committed by Nate Graham
Browse files

Make updates being available more obvious in compact mode

Prior to this patch, once Discover was started up and in compact mode,
there would be no visible indication at all that updates were available,
unless the user manually pulled out the global drawer and spotted the
orange entry at the bottom. This introduces an inline message at the
top, giving the user a positive bit of information that there are in
fact updates available, and what they can do about that.
parent de1efba1
......@@ -64,6 +64,32 @@ DiscoverPage
readonly property bool compact: page.width < 550 || !applicationWindow().wideScreen
header: ToolBar {
width: page.width
height: visible ? youGotUpdatesHeaderMessage.height + Kirigami.Units.smallSpacing * 4 : 0
visible: page.compact && ResourcesModel.updatesCount>0
Kirigami.InlineMessage {
id: youGotUpdatesHeaderMessage
visible: true
anchors {
left: parent.left
right: parent.right
top: parent.top
leftMargin: Kirigami.Units.smallSpacing
rightMargin: Kirigami.Units.smallSpacing
}
icon.name: updateAction.icon.name
text: i18n("Updates are available")
actions: [
Kirigami.Action {
icon.name: "go-next"
text: i18nc("Short for 'show updates'", "Show")
onTriggered: { updateAction.trigger(); }
}
]
}
}
Kirigami.CardsListView {
id: apps
model: FeaturedModel {}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment