Commit 9a432526 authored by eekkelund's avatar eekkelund

[AppLauncher] Add fontawesome icons to AppLauncher

parent b2030497
...@@ -204,6 +204,7 @@ GridView { ...@@ -204,6 +204,7 @@ GridView {
property color color2: "#80ff0000" property color color2: "#80ff0000"
property color color3: "#4Dff0000" property color color3: "#4Dff0000"
property alias text: removeLabel.text property alias text: removeLabel.text
anchors.left: parent.left
visible: gridview.onUninstall visible: gridview.onUninstall
height: Theme.itemHeightExtraLarge height: Theme.itemHeightExtraLarge
width: gridview.width / 2 width: gridview.width / 2
...@@ -212,19 +213,32 @@ GridView { ...@@ -212,19 +213,32 @@ GridView {
GradientStop { position: 0.5; color: remove.color2 } GradientStop { position: 0.5; color: remove.color2 }
GradientStop { position: 1.0; color: remove.color3 } GradientStop { position: 1.0; color: remove.color3 }
} }
Row {
width: parent.width
height: parent.height
Image {
id:removeIcon
fillMode: Image.PreserveAspectFit
height: parent.height -Theme.itemSpacingExtraSmall
width: height
anchors.verticalCenter: parent.verticalCenter
source: "image://theme/remove"
visible: deleter.state != "remove"
}
Label { Label {
id: removeLabel id: removeLabel
height: parent.height
width: parent.width
anchors.centerIn: parent
text: qsTr("Remove") text: qsTr("Remove")
height: parent.height
width: parent.width - (removeIcon.visible ? removeIcon.width : 0)
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: Theme.fontSizeLarge font.pixelSize: Theme.fontSizeLarge
elide:Text.ElideRight elide:Text.ElideRight
horizontalAlignment:Text.AlignHCenter horizontalAlignment:Text.AlignHCenter
verticalAlignment:Text.AlignVCenter verticalAlignment:Text.AlignVCenter
} }
} }
}
Rectangle { Rectangle {
id: uninstall id: uninstall
property color color1: "#D9ff0000" property color color1: "#D9ff0000"
...@@ -240,11 +254,24 @@ GridView { ...@@ -240,11 +254,24 @@ GridView {
GradientStop { position: 0.5; color: uninstall.color2 } GradientStop { position: 0.5; color: uninstall.color2 }
GradientStop { position: 1.0; color: uninstall.color3 } GradientStop { position: 1.0; color: uninstall.color3 }
} }
Row {
width: parent.width
height: parent.height
Image {
id:trashIcon
fillMode: Image.PreserveAspectFit
height: parent.height -Theme.itemSpacingExtraSmall
width: height
anchors.verticalCenter: parent.verticalCenter
source: "image://theme/trash"
visible: deleter.state != "uninstall"
}
Label { Label {
id: uninstallLabel id: uninstallLabel
height: parent.height height: parent.height
width: parent.width width: parent.width - (trashIcon.visible ? trashIcon.width : 0)
anchors.centerIn: parent anchors.verticalCenter: parent.verticalCenter
text: qsTr("Uninstall") text: qsTr("Uninstall")
font.pixelSize: Theme.fontSizeLarge font.pixelSize: Theme.fontSizeLarge
elide:Text.ElideRight elide:Text.ElideRight
...@@ -253,6 +280,7 @@ GridView { ...@@ -253,6 +280,7 @@ GridView {
} }
} }
} }
}
onFolderIndexChanged: if (folderIndex == -1) newFolderActive = false onFolderIndexChanged: if (folderIndex == -1) newFolderActive = false
......
...@@ -46,6 +46,7 @@ Item { ...@@ -46,6 +46,7 @@ Item {
closeMode = false; closeMode = false;
} }
} }
clip: true
// Empty switcher indicator // Empty switcher indicator
Rectangle { Rectangle {
id: topText id: topText
......
...@@ -58,9 +58,8 @@ Item { ...@@ -58,9 +58,8 @@ Item {
id:margin id:margin
height: Theme.itemSpacingSmall height: Theme.itemSpacingSmall
} }
Row {
TextField { id:searchRow
id:searchField
anchors { anchors {
top:margin.bottom top:margin.bottom
left: parent.left left: parent.left
...@@ -70,12 +69,25 @@ Item { ...@@ -70,12 +69,25 @@ Item {
rightMargin: Theme.itemSpacingMedium rightMargin: Theme.itemSpacingMedium
bottomMargin:Theme.itemSpacingHuge bottomMargin:Theme.itemSpacingHuge
} }
Image {
id:searchIcon
anchors.verticalCenter: parent.verticalCenter
width:height
height: searchField.height
fillMode: Image.PreserveAspectFit
source: "image://theme/search"
}
TextField {
id:searchField
width:parent.width - searchIcon.width - Theme.itemSpacingMedium
placeholderText: qsTr("Search")
Binding { Binding {
target: gridview target: gridview
property: "searchString" property: "searchString"
value: searchField.text.toLowerCase().trim() value: searchField.text.toLowerCase().trim()
} }
}
} }
ListView { ListView {
...@@ -83,7 +95,7 @@ Item { ...@@ -83,7 +95,7 @@ Item {
clip: true clip: true
width: parent.width width: parent.width
height:contentHeight height:contentHeight
anchors.top: searchField.bottom anchors.top: searchRow.bottom
anchors.topMargin: Theme.itemSpacingSmall anchors.topMargin: Theme.itemSpacingSmall
visible: searchString.length>0 visible: searchString.length>0
section.property: 'category' section.property: 'category'
......
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