init: working version
This commit is contained in:
commit
7d8d7dacae
109 changed files with 15066 additions and 0 deletions
80
modules/launcher/items/ActionItem.qml
Normal file
80
modules/launcher/items/ActionItem.qml
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
import "../services"
|
||||
import qs.config
|
||||
import qs.custom
|
||||
import qs.services
|
||||
import qs.util
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
required property Actions.Action modelData
|
||||
required property PersistentProperties uiState
|
||||
required property var list
|
||||
|
||||
implicitHeight: Config.launcher.itemHeight
|
||||
|
||||
anchors.left: parent?.left
|
||||
anchors.right: parent?.right
|
||||
|
||||
StateLayer {
|
||||
radius: 1000
|
||||
anchors.fill: parent
|
||||
|
||||
function onClicked(): void {
|
||||
root.uiState.launcher = false;
|
||||
root.modelData?.onClicked(root.uiState);
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
anchors.leftMargin: 12
|
||||
anchors.rightMargin: 12
|
||||
anchors.margins: 7
|
||||
|
||||
MaterialIcon {
|
||||
id: icon
|
||||
|
||||
text: root.modelData?.icon ?? ""
|
||||
font.pointSize: Config.font.size.largest
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Item {
|
||||
anchors.left: icon.right
|
||||
anchors.leftMargin: 12
|
||||
anchors.verticalCenter: icon.verticalCenter
|
||||
|
||||
implicitWidth: parent.width - icon.width
|
||||
implicitHeight: name.implicitHeight + desc.implicitHeight
|
||||
|
||||
CustomText {
|
||||
id: name
|
||||
|
||||
text: root.modelData?.name ?? ""
|
||||
font.pointSize: Config.font.size.normal
|
||||
color: root.ListView.isCurrentItem ? Color.mute(Config.colors.launcherActions, 1.1) : Config.colors.primary
|
||||
|
||||
Behavior on color {
|
||||
CAnim {}
|
||||
}
|
||||
}
|
||||
|
||||
CustomText {
|
||||
id: desc
|
||||
|
||||
text: root.modelData?.desc ?? ""
|
||||
font.pointSize: Config.font.size.small
|
||||
color: Config.colors.tertiary
|
||||
|
||||
elide: Text.ElideRight
|
||||
width: root.width - icon.width - 34
|
||||
|
||||
anchors.top: name.bottom
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue