Skip to content

Commit

Permalink
Add a UnifiedSearchPlaceholderView
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra authored and mgallien committed Nov 21, 2024
1 parent baedf15 commit 5fdc8a2
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<file>src/gui/tray/UnifiedSearchResultItemSkeletonGradientRectangle.qml</file>
<file>src/gui/tray/UnifiedSearchResultListItem.qml</file>
<file>src/gui/tray/UnifiedSearchResultNothingFound.qml</file>
<file>src/gui/tray/UnifiedSearchPlaceholderView.qml</file>
<file>src/gui/tray/UnifiedSearchResultSectionItem.qml</file>
<file>src/gui/tray/ActivityItemContextMenu.qml</file>
<file>src/gui/tray/ActivityItemActions.qml</file>
Expand Down
52 changes: 52 additions & 0 deletions src/gui/tray/UnifiedSearchPlaceholderView.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright (C) 2024 by Claudio Cambra <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/

import QtQml
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Style

ColumnLayout {
id: unifiedSearchResultNothingFoundContainer

spacing: Style.standardSpacing

Item {
Layout.fillWidth: true
Layout.fillHeight: true
}

Image {
id: unifiedSearchResultsNoResultsLabelIcon
source: "image://svgimage-custom-color/magnifying-glass.svg"
sourceSize.width: Style.trayWindowHeaderHeight / 2
sourceSize.height: Style.trayWindowHeaderHeight / 2
Layout.alignment: Qt.AlignHCenter
}

EnforcedPlainTextLabel {
id: unifiedSearchResultsNoResultsLabel
text: qsTr("Start typing to search")
font.pixelSize: Style.subLinePixelSize * 1.25
wrapMode: Text.Wrap
Layout.fillWidth: true
horizontalAlignment: Text.AlignHCenter
}

Item {
Layout.fillWidth: true
Layout.fillHeight: true
}
}

0 comments on commit 5fdc8a2

Please sign in to comment.