Commit 01f073c8 authored by Chupligin Sergey's avatar Chupligin Sergey

[AppLauncher] show folder icon and app count on it

parent 10a82b8e
...@@ -91,7 +91,9 @@ GridView { ...@@ -91,7 +91,9 @@ GridView {
id: launcherItem id: launcherItem
width: gridview.cellWidth width: gridview.cellWidth
height: gridview.cellHeight height: gridview.cellHeight
source: model.object.iconId == "" ? "/usr/share/lipstick-glacier-home-qt5/qml/theme/default_icon.png" : (model.object.iconId.indexOf("/") == 0 ? "file://" : "image://theme/") + model.object.iconId
iconCaption: model.object.title iconCaption: model.object.title
isFolder: model.object.type == LauncherModel.Folder
folderAppsCount: isFolder && model.object ? model.object.itemCount : 0
source: model.object.iconId == "" || isFolder ? "/usr/share/lipstick-glacier-home-qt5/qml/theme/default-icon.png" : (model.object.iconId.indexOf("/") == 0 ? "file://" : "image://theme/") + model.object.iconId
} }
} }
...@@ -35,6 +35,8 @@ Item { ...@@ -35,6 +35,8 @@ Item {
property bool reordering property bool reordering
property int newIndex: -1 property int newIndex: -1
property real oldY property real oldY
property bool isFolder
property int folderAppsCount: 0
onXChanged: moveTimer.start() onXChanged: moveTimer.start()
onYChanged: moveTimer.start() onYChanged: moveTimer.start()
...@@ -71,8 +73,9 @@ Item { ...@@ -71,8 +73,9 @@ Item {
height: gridview.cellHeight height: gridview.cellHeight
Image { Image {
id: iconimage id: iconimage
source: model.object.iconId == "" ? ":/images/icons/apps.png" : (model.object.iconId.indexOf("/") == 0 ? "file://" : "image://theme/") + model.object.iconId source: source
} }
Text { Text {
id: icontext id: icontext
// elide only works if an explicit width is set // elide only works if an explicit width is set
...@@ -217,6 +220,18 @@ Item { ...@@ -217,6 +220,18 @@ Item {
} }
} }
Text{
id: itemsCount
visible: isFolder
text: folderAppsCount
anchors.centerIn: iconImage
horizontalAlignment: Text.AlignHCenter
font.pixelSize: gridview.cellWidth/4
color: "white"
}
// Caption for the icon // Caption for the icon
Text { Text {
id: iconText id: iconText
......
Markdown is supported
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