42 lines
1.1 KiB
QML
42 lines
1.1 KiB
QML
import QtQuick 2.12
|
|
import QtQuick.Layouts 1.12
|
|
import QtQuick.Controls 2.5
|
|
import org.ukui.menu.core 1.0
|
|
|
|
MouseArea {
|
|
id: control
|
|
hoverEnabled: true
|
|
// ToolTip.visible: content.textTruncated && control.containsMouse
|
|
// ToolTip.text: name
|
|
|
|
StyleBackground {
|
|
anchors.fill: parent
|
|
radius: 4
|
|
useStyleTransparent: false
|
|
alpha: control.containsPress ? 0.82 : control.containsMouse ? 0.55 : 0.00
|
|
|
|
RowLayout {
|
|
anchors.fill: parent
|
|
anchors.leftMargin: 12
|
|
spacing: 12
|
|
FolderIcon {
|
|
rows: 2; columns: 2
|
|
spacing: 2; padding: 2
|
|
icons: icon
|
|
Layout.alignment: Qt.AlignVCenter
|
|
Layout.preferredWidth: 32
|
|
Layout.preferredHeight: 32
|
|
}
|
|
|
|
Text {
|
|
Layout.fillWidth: true
|
|
Layout.fillHeight: true
|
|
verticalAlignment: Text.AlignVCenter
|
|
horizontalAlignment: Text.AlignLeft
|
|
elide: Text.ElideRight
|
|
text: name
|
|
}
|
|
}
|
|
}
|
|
}
|