Cura/plugins/UM3NetworkPrinting/resources/qml/PrintJobContextMenuItem.qml
Ian Paschal dc4b69c386 Show context menu at the right times
Contributes to CL-1126
2018-11-06 16:37:47 +01:00

23 lines
722 B
QML

// Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 2.0
import QtQuick.Controls.Styles 1.4
import UM 1.3 as UM
Button {
background: Rectangle {
opacity: parent.down || parent.hovered ? 1 : 0;
color: UM.Theme.getColor("monitor_context_menu_highlight");
}
contentItem: Label {
color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("text_inactive");
text: parent.text
horizontalAlignment: Text.AlignLeft;
verticalAlignment: Text.AlignVCenter;
}
height: visible ? 39 * screenScaleFactor : 0; // TODO: Theme!
hoverEnabled: true;
width: parent.width;
}