SearchBar.qml 861 B

1234567891011121314151617181920212223242526272829303132333435
  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. font.italic: true
  14. UM.ColorImage
  15. {
  16. id: searchIcon
  17. anchors
  18. {
  19. verticalCenter: parent.verticalCenter
  20. left: parent.left
  21. leftMargin: UM.Theme.getSize("default_margin").width
  22. }
  23. source: UM.Theme.getIcon("Magnifier")
  24. height: UM.Theme.getSize("small_button_icon").height
  25. width: height
  26. color: UM.Theme.getColor("text")
  27. }
  28. }