MonitorContextMenuButton.qml 957 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (c) 2019 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.3
  4. import QtQuick.Controls 2.0
  5. import UM 1.3 as UM
  6. import Cura 1.0 as Cura
  7. Button
  8. {
  9. id: base
  10. background: Rectangle
  11. {
  12. color: enabled ? UM.Theme.getColor("viewport_background") : "transparent"
  13. height: base.height
  14. opacity: base.down || base.hovered ? 1 : 0
  15. radius: Math.round(0.5 * width)
  16. width: base.width
  17. }
  18. contentItem: Label {
  19. color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
  20. font.pixelSize: 32 * screenScaleFactor
  21. horizontalAlignment: Text.AlignHCenter
  22. text: base.text
  23. verticalAlignment: Text.AlignVCenter
  24. renderType: Text.NativeRendering;
  25. }
  26. height: width
  27. hoverEnabled: enabled
  28. text: "\u22EE" //Unicode Three stacked points.
  29. width: 36 * screenScaleFactor // TODO: Theme!
  30. }