ShaderSection.qml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright (C) 2021 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
  3. import QtQuick 2.15
  4. import QtQuick.Layouts 1.15
  5. import HelperWidgets 2.0
  6. import StudioTheme 1.0 as StudioTheme
  7. Section {
  8. caption: qsTr("Shader")
  9. width: parent.width
  10. SectionLayout {
  11. PropertyLabel {
  12. text: qsTr("Source")
  13. tooltip: qsTr("Sets the shader source code.")
  14. }
  15. SecondColumnLayout {
  16. UrlChooser {
  17. backendValue: backendValues.shader
  18. filter: "*.vert *.frag *.glslv *.glslf *.glsl *.vsh *.fsh"
  19. }
  20. ExpandingSpacer {}
  21. }
  22. PropertyLabel {
  23. text: qsTr("Stage")
  24. tooltip: qsTr("Sets the shader stage.")
  25. }
  26. SecondColumnLayout {
  27. ComboBox {
  28. scope: "Shader"
  29. model: ["Vertex", "Fragment"]
  30. backendValue: backendValues.stage
  31. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  32. + StudioTheme.Values.actionIndicatorWidth
  33. }
  34. ExpandingSpacer {}
  35. }
  36. }
  37. }