2023-03-28 09:38:39 +08:00
|
|
|
import QtQuick 2.12
|
2023-02-14 09:34:15 +08:00
|
|
|
import QtQuick.Layouts 1.12
|
2023-03-28 09:38:39 +08:00
|
|
|
import QtQuick.Controls 2.5
|
|
|
|
import org.ukui.menu.core 1.0
|
2023-02-14 09:34:15 +08:00
|
|
|
|
2023-03-31 16:08:10 +08:00
|
|
|
MouseArea {
|
|
|
|
id: control
|
|
|
|
hoverEnabled: true
|
2023-04-03 15:58:05 +08:00
|
|
|
// ToolTip.visible: content.textTruncated && control.containsMouse
|
|
|
|
// ToolTip.text: name
|
2023-02-14 09:34:15 +08:00
|
|
|
|
2023-03-31 16:08:10 +08:00
|
|
|
StyleBackground {
|
2023-03-28 09:38:39 +08:00
|
|
|
anchors.fill: parent
|
2023-03-31 16:08:10 +08:00
|
|
|
radius: 4
|
|
|
|
useStyleTransparent: false
|
|
|
|
alpha: control.containsPress ? 0.82 : control.containsMouse ? 0.55 : 0.00
|
2023-02-14 09:34:15 +08:00
|
|
|
|
2023-04-03 15:58:05 +08:00
|
|
|
RowLayout {
|
2023-03-31 16:08:10 +08:00
|
|
|
anchors.fill: parent
|
2023-04-03 15:58:05 +08:00
|
|
|
anchors.leftMargin: 12
|
2023-03-31 16:08:10 +08:00
|
|
|
spacing: 12
|
2023-04-03 15:58:05 +08:00
|
|
|
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
|
|
|
|
}
|
2023-02-14 09:34:15 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|