2023-02-20 17:23:08 +08:00
|
|
|
import QtQuick 2.12
|
2023-02-14 09:34:15 +08:00
|
|
|
import QtQuick.Layouts 1.12
|
2023-02-20 17:23:08 +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-02-14 09:34:15 +08:00
|
|
|
|
2023-03-31 16:08:10 +08:00
|
|
|
StyleBackground {
|
2023-02-20 17:23:08 +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
|
|
|
|
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
|
|
|
IconLabel {
|
|
|
|
id: content
|
|
|
|
anchors.fill: parent
|
|
|
|
iconHeight: 32; iconWidth: iconHeight
|
|
|
|
appName: name; appIcon: icon
|
|
|
|
display: Display.TextBesideIcon
|
|
|
|
spacing: 12
|
2023-02-14 09:34:15 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|