launcher v1
This commit is contained in:
parent
8504f8ddd2
commit
d71c9604a6
12 changed files with 1608 additions and 4 deletions
60
modules/launcher/items/AppItem.qml
Normal file
60
modules/launcher/items/AppItem.qml
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
import qs.config
|
||||
import qs.widgets
|
||||
import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
required property DesktopEntry modelData
|
||||
required property int index
|
||||
property bool active: false
|
||||
|
||||
anchors.left: parent?.left
|
||||
anchors.right: parent?.right
|
||||
implicitHeight: grid.height
|
||||
|
||||
GridLayout {
|
||||
id: grid
|
||||
|
||||
columnSpacing: 12
|
||||
rowSpacing: 1
|
||||
columns: 2
|
||||
rows: 2
|
||||
|
||||
anchors.left: root?.left
|
||||
anchors.right: root?.right
|
||||
|
||||
IconImage {
|
||||
Layout.leftMargin: 8
|
||||
Layout.topMargin: 8
|
||||
Layout.bottomMargin: 8
|
||||
Layout.columnSpan: 1
|
||||
Layout.rowSpan: 2
|
||||
source: Quickshell.iconPath(root.modelData.runInTerminal ? "terminal-app" : root.modelData.icon, "image-missing")
|
||||
implicitSize: 32
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: root.modelData.name.trim()
|
||||
|
||||
Layout.alignment: Qt.AlignBottom
|
||||
Layout.fillWidth: true
|
||||
color: root.active ? Theme.palette.primarycontent : Theme.palette.basecontent
|
||||
font.pixelSize: 14
|
||||
font.bold: true
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: root.modelData.comment != "" ? root.modelData.comment : root.modelData.genericName
|
||||
|
||||
Layout.alignment: Qt.AlignTop
|
||||
Layout.fillWidth: true
|
||||
color: root.active ? Theme.palette.primarycontent : Theme.palette.basecontent
|
||||
font.pixelSize: 10
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue