MonitorContextMenuButton.qml 877 B

12345678910111213141516171819202122232425262728293031
  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.5 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: UM.Label
  19. {
  20. color: enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("monitor_text_disabled")
  21. font.pixelSize: 32 * screenScaleFactor
  22. horizontalAlignment: Text.AlignHCenter
  23. text: base.text
  24. }
  25. height: width
  26. hoverEnabled: enabled
  27. text: "\u22EE" //Unicode Three stacked points.
  28. width: 36 * screenScaleFactor // TODO: Theme!
  29. }