You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
wow-app/components/ContextMenuItem.qml

53 lines
1.3 KiB

import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.1
import FontAwesome 1.0
import "../components" as MoneroComponents
MenuItem {
id: menuItem
property bool glyphIconSolid: true
property alias glyphIcon: glyphIcon.text
background: Rectangle {
color: MoneroComponents.Style.buttonBackgroundColorDisabledHover
opacity: mouse.containsMouse ? 1 : 0
MouseArea {
id: mouse
anchors.fill: parent
hoverEnabled: true
onClicked: menuItem.triggered()
visible: menuItem.enabled
}
}
contentItem: RowLayout {
anchors.fill: parent
anchors.leftMargin: 10
anchors.rightMargin: 10
opacity: menuItem.enabled ? 1 : 0.4
spacing: 8
Text {
id: glyphIcon
color: MoneroComponents.Style.buttonTextColor
font.family: glyphIconSolid ? FontAwesome.fontFamilySolid : FontAwesome.fontFamily
font.pixelSize: 14
font.styleName: glyphIconSolid ? "Solid" : "Regular"
}
Text {
color: MoneroComponents.Style.buttonTextColor
font.family: MoneroComponents.Style.fontRegular.name
font.pixelSize: 14
Layout.fillWidth: true
text: menuItem.text
}
}
}