NoIntentIcon.qml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) 2019 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.10
  4. import QtQuick.Controls 2.3
  5. import UM 1.2 as UM
  6. import Cura 1.6 as Cura
  7. Item
  8. {
  9. id: icon
  10. property var affected_extruders
  11. property var intent_type: ""
  12. implicitWidth: UM.Theme.getSize("section_icon").width
  13. implicitHeight: UM.Theme.getSize("section_icon").height
  14. UM.RecolorImage
  15. {
  16. source: UM.Theme.getIcon("info")
  17. color: UM.Theme.getColor("icon")
  18. anchors.fill: parent
  19. }
  20. MouseArea
  21. {
  22. anchors.fill: parent
  23. hoverEnabled: parent.visible
  24. onEntered:
  25. {
  26. var tooltipContent = catalog.i18ncp("@label %1 is filled in with the type of a profile. %2 is filled with a list of numbers (eg '1' or '1, 2')", "There is no %1 profile for the configuration in extruder %2. The default intent will be used instead", "There is no %1 profile for the configurations in extruders %2. The default intent will be used instead", affected_extruders.length).arg(intent_type).arg(affected_extruders)
  27. base.showTooltip(icon.parent, Qt.point(-UM.Theme.getSize("thick_margin").width, 0), tooltipContent)
  28. }
  29. onExited: base.hideTooltip()
  30. }
  31. }