PrintJobContextMenuItem.qml 768 B

123456789101112131415161718192021222324
  1. // Copyright (c) 2019 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.2
  4. import QtQuick.Controls 2.0
  5. import QtQuick.Controls.Styles 1.4
  6. import UM 1.3 as UM
  7. Button {
  8. background: Rectangle {
  9. opacity: parent.down || parent.hovered ? 1 : 0;
  10. color: UM.Theme.getColor("monitor_context_menu_hover")
  11. }
  12. contentItem: Label {
  13. color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled");
  14. text: parent.text
  15. horizontalAlignment: Text.AlignLeft;
  16. verticalAlignment: Text.AlignVCenter;
  17. renderType: Text.NativeRendering;
  18. }
  19. height: visible ? 39 * screenScaleFactor : 0; // TODO: Theme!
  20. hoverEnabled: true;
  21. width: parent.width;
  22. }