working ish
This commit is contained in:
1 parent
ba85d9658d
commit
7d58533539
14 files changed
+367
-130
No files matched your search
@@ -0,0 +1,49 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import QtQuick.Layouts
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
required property var theme
|
||||
required property App app
|
||||
required property bool selected
|
||||
|
||||
signal activated()
|
||||
|
||||
width: theme.cardWidth
|
||||
height: theme.cardHeight
|
||||
radius: theme.cornerRadius
|
||||
color: theme.cardBg
|
||||
border.width: selected ? 3 : 1
|
||||
border.color: selected ? theme.selectedBorder : theme.cardBorder
|
||||
clip: true
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 10
|
||||
width: root.theme.cardWidth
|
||||
height: root.theme.cardHeight
|
||||
anchors.fill: parent
|
||||
anchors.margins: root.theme.cardPadding
|
||||
Image {
|
||||
fillMode: Image.PreserveAspectFit
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
source: root.app.isIcon ? Quickshell.iconPath(root.app.image) : root.app.image
|
||||
}
|
||||
Text {
|
||||
id: label
|
||||
elide: Text.ElideRight
|
||||
color: root.theme.textColor
|
||||
text: root.app.name
|
||||
font.pixelSize: root.theme.fontSize
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: root.activated()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user