SearchBar.qml 841 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright (C) 2021 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.15
  4. import QtQuick.Controls 2.15
  5. import QtQuick.Layouts 1.1
  6. import UM 1.6 as UM
  7. import Cura 1.7 as Cura
  8. Cura.TextField
  9. {
  10. UM.I18nCatalog { id: catalog; name: "cura" }
  11. leftPadding: searchIcon.width + UM.Theme.getSize("default_margin").width * 2
  12. placeholderText: catalog.i18nc("@placeholder", "Search")
  13. UM.RecolorImage
  14. {
  15. id: searchIcon
  16. anchors
  17. {
  18. verticalCenter: parent.verticalCenter
  19. left: parent.left
  20. leftMargin: UM.Theme.getSize("default_margin").width
  21. }
  22. source: UM.Theme.getIcon("Magnifier")
  23. height: UM.Theme.getSize("small_button_icon").height
  24. width: height
  25. color: UM.Theme.getColor("text")
  26. }
  27. }