SimulationViewMenuComponent.qml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696
  1. // Copyright (c) 2018 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.4
  4. import QtQuick.Controls 1.2
  5. import QtQuick.Layouts 1.1
  6. import QtQuick.Controls.Styles 1.1
  7. import QtGraphicalEffects 1.0
  8. import UM 1.0 as UM
  9. import Cura 1.0 as Cura
  10. Cura.ExpandableComponent
  11. {
  12. id: base
  13. dragPreferencesNamePrefix: "view/colorscheme"
  14. contentHeaderTitle: catalog.i18nc("@label", "Color scheme")
  15. Connections
  16. {
  17. target: UM.Preferences
  18. function onPreferenceChanged(preference)
  19. {
  20. if (preference !== "view/only_show_top_layers" && preference !== "view/top_layer_count" && ! preference.match("layerview/"))
  21. {
  22. return;
  23. }
  24. layerTypeCombobox.currentIndex = UM.SimulationView.compatibilityMode ? 1 : UM.Preferences.getValue("layerview/layer_view_type")
  25. layerTypeCombobox.updateLegends(layerTypeCombobox.currentIndex)
  26. viewSettings.extruder_opacities = UM.Preferences.getValue("layerview/extruder_opacities").split("|")
  27. viewSettings.show_travel_moves = UM.Preferences.getValue("layerview/show_travel_moves")
  28. viewSettings.show_helpers = UM.Preferences.getValue("layerview/show_helpers")
  29. viewSettings.show_skin = UM.Preferences.getValue("layerview/show_skin")
  30. viewSettings.show_infill = UM.Preferences.getValue("layerview/show_infill")
  31. viewSettings.only_show_top_layers = UM.Preferences.getValue("view/only_show_top_layers")
  32. viewSettings.top_layer_count = UM.Preferences.getValue("view/top_layer_count")
  33. }
  34. }
  35. headerItem: Item
  36. {
  37. Label
  38. {
  39. id: colorSchemeLabel
  40. text: catalog.i18nc("@label", "Color scheme")
  41. verticalAlignment: Text.AlignVCenter
  42. height: parent.height
  43. elide: Text.ElideRight
  44. font: UM.Theme.getFont("medium")
  45. color: UM.Theme.getColor("text_medium")
  46. renderType: Text.NativeRendering
  47. }
  48. Label
  49. {
  50. text: layerTypeCombobox.currentText
  51. verticalAlignment: Text.AlignVCenter
  52. anchors
  53. {
  54. left: colorSchemeLabel.right
  55. leftMargin: UM.Theme.getSize("default_margin").width
  56. right: parent.right
  57. }
  58. height: parent.height
  59. elide: Text.ElideRight
  60. font: UM.Theme.getFont("medium")
  61. color: UM.Theme.getColor("text")
  62. renderType: Text.NativeRendering
  63. }
  64. }
  65. contentItem: Column
  66. {
  67. id: viewSettings
  68. property var extruder_opacities: UM.Preferences.getValue("layerview/extruder_opacities").split("|")
  69. property bool show_travel_moves: UM.Preferences.getValue("layerview/show_travel_moves")
  70. property bool show_helpers: UM.Preferences.getValue("layerview/show_helpers")
  71. property bool show_skin: UM.Preferences.getValue("layerview/show_skin")
  72. property bool show_infill: UM.Preferences.getValue("layerview/show_infill")
  73. property bool show_starts: UM.Preferences.getValue("layerview/show_starts")
  74. // If we are in compatibility mode, we only show the "line type"
  75. property bool show_legend: UM.SimulationView.compatibilityMode ? true : UM.Preferences.getValue("layerview/layer_view_type") == 1
  76. property bool show_gradient: UM.SimulationView.compatibilityMode ? false : UM.Preferences.getValue("layerview/layer_view_type") == 2 || UM.Preferences.getValue("layerview/layer_view_type") == 3
  77. property bool show_feedrate_gradient: show_gradient && UM.Preferences.getValue("layerview/layer_view_type") == 2
  78. property bool show_thickness_gradient: show_gradient && UM.Preferences.getValue("layerview/layer_view_type") == 3
  79. property bool show_line_width_gradient: show_gradient && UM.Preferences.getValue("layerview/layer_view_type") == 4
  80. property bool show_flow_rate_gradient: show_gradient && UM.Preferences.getValue("layerview/layer_view_type") == 5
  81. property bool only_show_top_layers: UM.Preferences.getValue("view/only_show_top_layers")
  82. property int top_layer_count: UM.Preferences.getValue("view/top_layer_count")
  83. width: UM.Theme.getSize("layerview_menu_size").width - 2 * UM.Theme.getSize("default_margin").width
  84. height: implicitHeight
  85. spacing: UM.Theme.getSize("layerview_row_spacing").height
  86. ListModel // matches SimulationView.py
  87. {
  88. id: layerViewTypes
  89. }
  90. Component.onCompleted:
  91. {
  92. layerViewTypes.append({
  93. text: catalog.i18nc("@label:listbox", "Material Color"),
  94. type_id: 0
  95. })
  96. layerViewTypes.append({
  97. text: catalog.i18nc("@label:listbox", "Line Type"),
  98. type_id: 1
  99. })
  100. layerViewTypes.append({
  101. text: catalog.i18nc("@label:listbox", "Speed"),
  102. type_id: 2
  103. })
  104. layerViewTypes.append({
  105. text: catalog.i18nc("@label:listbox", "Layer Thickness"),
  106. type_id: 3 // these ids match the switching in the shader
  107. })
  108. layerViewTypes.append({
  109. text: catalog.i18nc("@label:listbox", "Line Width"),
  110. type_id: 4
  111. })
  112. layerViewTypes.append({
  113. text: catalog.i18nc("@label:listbox", "Flow"),
  114. type_id: 5
  115. })
  116. }
  117. ComboBox
  118. {
  119. id: layerTypeCombobox
  120. width: parent.width
  121. model: layerViewTypes
  122. visible: !UM.SimulationView.compatibilityMode
  123. style: UM.Theme.styles.combobox
  124. onActivated:
  125. {
  126. UM.Preferences.setValue("layerview/layer_view_type", index);
  127. }
  128. Component.onCompleted:
  129. {
  130. currentIndex = UM.SimulationView.compatibilityMode ? 1 : UM.Preferences.getValue("layerview/layer_view_type");
  131. updateLegends(currentIndex);
  132. }
  133. function updateLegends(type_id)
  134. {
  135. // Update the visibility of the legends.
  136. viewSettings.show_legend = UM.SimulationView.compatibilityMode || (type_id == 1);
  137. viewSettings.show_gradient = !UM.SimulationView.compatibilityMode &&
  138. (type_id == 2 || type_id == 3 || type_id == 4 || type_id == 5) ;
  139. viewSettings.show_feedrate_gradient = viewSettings.show_gradient && (type_id == 2);
  140. viewSettings.show_thickness_gradient = viewSettings.show_gradient && (type_id == 3);
  141. viewSettings.show_line_width_gradient = viewSettings.show_gradient && (type_id == 4);
  142. viewSettings.show_flow_rate_gradient = viewSettings.show_gradient && (type_id == 5);
  143. }
  144. }
  145. Label
  146. {
  147. id: compatibilityModeLabel
  148. text: catalog.i18nc("@label", "Compatibility Mode")
  149. font: UM.Theme.getFont("default")
  150. color: UM.Theme.getColor("text")
  151. visible: UM.SimulationView.compatibilityMode
  152. height: UM.Theme.getSize("layerview_row").height
  153. width: parent.width
  154. renderType: Text.NativeRendering
  155. }
  156. Item // Spacer
  157. {
  158. height: UM.Theme.getSize("narrow_margin").width
  159. width: width
  160. }
  161. Repeater
  162. {
  163. model: CuraApplication.getExtrudersModel()
  164. CheckBox
  165. {
  166. id: extrudersModelCheckBox
  167. checked: viewSettings.extruder_opacities[index] > 0.5 || viewSettings.extruder_opacities[index] == undefined || viewSettings.extruder_opacities[index] == ""
  168. height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height
  169. width: parent.width
  170. visible: !UM.SimulationView.compatibilityMode
  171. onClicked:
  172. {
  173. viewSettings.extruder_opacities[index] = checked ? 1.0 : 0.0
  174. UM.Preferences.setValue("layerview/extruder_opacities", viewSettings.extruder_opacities.join("|"));
  175. }
  176. style: UM.Theme.styles.checkbox
  177. Rectangle
  178. {
  179. id: swatch
  180. anchors.verticalCenter: parent.verticalCenter
  181. anchors.right: extrudersModelCheckBox.right
  182. width: UM.Theme.getSize("layerview_legend_size").width
  183. height: UM.Theme.getSize("layerview_legend_size").height
  184. color: model.color
  185. border.width: UM.Theme.getSize("default_lining").width
  186. border.color: UM.Theme.getColor("lining")
  187. }
  188. Label
  189. {
  190. text: model.name
  191. elide: Text.ElideRight
  192. color: UM.Theme.getColor("setting_control_text")
  193. font: UM.Theme.getFont("default")
  194. anchors
  195. {
  196. verticalCenter: parent.verticalCenter
  197. left: extrudersModelCheckBox.left
  198. right: extrudersModelCheckBox.right
  199. leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width / 2)
  200. rightMargin: UM.Theme.getSize("default_margin").width * 2
  201. }
  202. renderType: Text.NativeRendering
  203. }
  204. }
  205. }
  206. Repeater
  207. {
  208. model: ListModel
  209. {
  210. id: typesLegendModel
  211. Component.onCompleted:
  212. {
  213. typesLegendModel.append({
  214. label: catalog.i18nc("@label", "Travels"),
  215. initialValue: viewSettings.show_travel_moves,
  216. preference: "layerview/show_travel_moves",
  217. colorId: "layerview_move_combing"
  218. });
  219. typesLegendModel.append({
  220. label: catalog.i18nc("@label", "Helpers"),
  221. initialValue: viewSettings.show_helpers,
  222. preference: "layerview/show_helpers",
  223. colorId: "layerview_support"
  224. });
  225. typesLegendModel.append({
  226. label: catalog.i18nc("@label", "Shell"),
  227. initialValue: viewSettings.show_skin,
  228. preference: "layerview/show_skin",
  229. colorId: "layerview_inset_0"
  230. });
  231. typesLegendModel.append({
  232. label: catalog.i18nc("@label", "Infill"),
  233. initialValue: viewSettings.show_infill,
  234. preference: "layerview/show_infill",
  235. colorId: "layerview_infill"
  236. });
  237. if (! UM.SimulationView.compatibilityMode)
  238. {
  239. typesLegendModel.append({
  240. label: catalog.i18nc("@label", "Starts"),
  241. initialValue: viewSettings.show_starts,
  242. preference: "layerview/show_starts",
  243. colorId: "layerview_starts"
  244. });
  245. }
  246. }
  247. }
  248. CheckBox
  249. {
  250. id: legendModelCheckBox
  251. checked: model.initialValue
  252. onClicked: UM.Preferences.setValue(model.preference, checked)
  253. height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height
  254. width: parent.width
  255. style: UM.Theme.styles.checkbox
  256. Rectangle
  257. {
  258. anchors.verticalCenter: parent.verticalCenter
  259. anchors.right: legendModelCheckBox.right
  260. width: UM.Theme.getSize("layerview_legend_size").width
  261. height: UM.Theme.getSize("layerview_legend_size").height
  262. color: UM.Theme.getColor(model.colorId)
  263. border.width: UM.Theme.getSize("default_lining").width
  264. border.color: UM.Theme.getColor("lining")
  265. visible: viewSettings.show_legend
  266. }
  267. Label
  268. {
  269. text: label
  270. font: UM.Theme.getFont("default")
  271. elide: Text.ElideRight
  272. renderType: Text.NativeRendering
  273. color: UM.Theme.getColor("setting_control_text")
  274. anchors.verticalCenter: parent.verticalCenter
  275. anchors.left: legendModelCheckBox.left
  276. anchors.right: legendModelCheckBox.right
  277. anchors.leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width / 2)
  278. anchors.rightMargin: UM.Theme.getSize("default_margin").width * 2
  279. }
  280. }
  281. }
  282. CheckBox
  283. {
  284. checked: viewSettings.only_show_top_layers
  285. onClicked: UM.Preferences.setValue("view/only_show_top_layers", checked ? 1.0 : 0.0)
  286. text: catalog.i18nc("@label", "Only Show Top Layers")
  287. visible: UM.SimulationView.compatibilityMode
  288. style: UM.Theme.styles.checkbox
  289. width: parent.width
  290. }
  291. CheckBox
  292. {
  293. checked: viewSettings.top_layer_count == 5
  294. onClicked: UM.Preferences.setValue("view/top_layer_count", checked ? 5 : 1)
  295. text: catalog.i18nc("@label", "Show 5 Detailed Layers On Top")
  296. width: parent.width
  297. visible: UM.SimulationView.compatibilityMode
  298. style: UM.Theme.styles.checkbox
  299. }
  300. Repeater
  301. {
  302. model: ListModel
  303. {
  304. id: typesLegendModelNoCheck
  305. Component.onCompleted:
  306. {
  307. typesLegendModelNoCheck.append({
  308. label: catalog.i18nc("@label", "Top / Bottom"),
  309. colorId: "layerview_skin",
  310. });
  311. typesLegendModelNoCheck.append({
  312. label: catalog.i18nc("@label", "Inner Wall"),
  313. colorId: "layerview_inset_x",
  314. });
  315. }
  316. }
  317. Label
  318. {
  319. text: label
  320. visible: viewSettings.show_legend
  321. id: typesLegendModelLabel
  322. height: UM.Theme.getSize("layerview_row").height + UM.Theme.getSize("default_lining").height
  323. width: parent.width
  324. color: UM.Theme.getColor("setting_control_text")
  325. font: UM.Theme.getFont("default")
  326. renderType: Text.NativeRendering
  327. Rectangle
  328. {
  329. anchors.verticalCenter: parent.verticalCenter
  330. anchors.right: typesLegendModelLabel.right
  331. width: UM.Theme.getSize("layerview_legend_size").width
  332. height: UM.Theme.getSize("layerview_legend_size").height
  333. color: UM.Theme.getColor(model.colorId)
  334. border.width: UM.Theme.getSize("default_lining").width
  335. border.color: UM.Theme.getColor("lining")
  336. }
  337. }
  338. }
  339. // Text for the minimum, maximum and units for the feedrates and layer thickness
  340. Item
  341. {
  342. id: gradientLegend
  343. visible: viewSettings.show_gradient
  344. width: parent.width
  345. height: UM.Theme.getSize("layerview_row").height
  346. Label //Minimum value.
  347. {
  348. text:
  349. {
  350. if (UM.SimulationView.layerActivity && CuraApplication.platformActivity)
  351. {
  352. // Feedrate selected
  353. if (UM.Preferences.getValue("layerview/layer_view_type") == 2)
  354. {
  355. return parseFloat(UM.SimulationView.minFeedrate).toFixed(2)
  356. }
  357. // Layer thickness selected
  358. if (UM.Preferences.getValue("layerview/layer_view_type") == 3)
  359. {
  360. return parseFloat(UM.SimulationView.minThickness).toFixed(2)
  361. }
  362. // Line width selected
  363. if(UM.Preferences.getValue("layerview/layer_view_type") == 4)
  364. {
  365. return parseFloat(UM.SimulationView.minLineWidth).toFixed(2);
  366. }
  367. // Flow Rate selected
  368. if(UM.Preferences.getValue("layerview/layer_view_type") == 5)
  369. {
  370. return parseFloat(UM.SimulationView.minFlowRate).toFixed(2);
  371. }
  372. }
  373. return catalog.i18nc("@label","min")
  374. }
  375. anchors.left: parent.left
  376. color: UM.Theme.getColor("setting_control_text")
  377. font: UM.Theme.getFont("default")
  378. renderType: Text.NativeRendering
  379. }
  380. Label //Unit in the middle.
  381. {
  382. text:
  383. {
  384. if (UM.SimulationView.layerActivity && CuraApplication.platformActivity)
  385. {
  386. // Feedrate selected
  387. if (UM.Preferences.getValue("layerview/layer_view_type") == 2)
  388. {
  389. return "mm/s"
  390. }
  391. // Layer thickness selected
  392. if (UM.Preferences.getValue("layerview/layer_view_type") == 3)
  393. {
  394. return "mm"
  395. }
  396. //Line width selected
  397. if(UM.Preferences.getValue("layerview/layer_view_type") == 4)
  398. {
  399. return "mm"
  400. }
  401. // Flow Rate selected
  402. if (UM.Preferences.getValue("layerview/layer_view_type") == 5)
  403. {
  404. return "mm³/s"
  405. }
  406. }
  407. return ""
  408. }
  409. anchors.horizontalCenter: parent.horizontalCenter
  410. color: UM.Theme.getColor("setting_control_text")
  411. font: UM.Theme.getFont("default")
  412. }
  413. Label //Maximum value.
  414. {
  415. text: {
  416. if (UM.SimulationView.layerActivity && CuraApplication.platformActivity)
  417. {
  418. // Feedrate selected
  419. if (UM.Preferences.getValue("layerview/layer_view_type") == 2)
  420. {
  421. return parseFloat(UM.SimulationView.maxFeedrate).toFixed(2)
  422. }
  423. // Layer thickness selected
  424. if (UM.Preferences.getValue("layerview/layer_view_type") == 3)
  425. {
  426. return parseFloat(UM.SimulationView.maxThickness).toFixed(2)
  427. }
  428. //Line width selected
  429. if(UM.Preferences.getValue("layerview/layer_view_type") == 4)
  430. {
  431. return parseFloat(UM.SimulationView.maxLineWidth).toFixed(2);
  432. }
  433. // Flow rate selected
  434. if(UM.Preferences.getValue("layerview/layer_view_type") == 5)
  435. {
  436. return parseFloat(UM.SimulationView.maxFlowRate).toFixed(2);
  437. }
  438. }
  439. return catalog.i18nc("@label","max")
  440. }
  441. anchors.right: parent.right
  442. color: UM.Theme.getColor("setting_control_text")
  443. font: UM.Theme.getFont("default")
  444. }
  445. }
  446. // Gradient colors for feedrate
  447. Rectangle
  448. {
  449. id: feedrateGradient
  450. visible: (
  451. viewSettings.show_feedrate_gradient ||
  452. viewSettings.show_line_width_gradient
  453. )
  454. anchors.left: parent.left
  455. anchors.right: parent.right
  456. height: Math.round(UM.Theme.getSize("layerview_row").height * 1.5)
  457. border.width: UM.Theme.getSize("default_lining").width
  458. border.color: UM.Theme.getColor("lining")
  459. LinearGradient
  460. {
  461. anchors
  462. {
  463. left: parent.left
  464. leftMargin: UM.Theme.getSize("default_lining").width
  465. right: parent.right
  466. rightMargin: UM.Theme.getSize("default_lining").width
  467. top: parent.top
  468. topMargin: UM.Theme.getSize("default_lining").width
  469. bottom: parent.bottom
  470. bottomMargin: UM.Theme.getSize("default_lining").width
  471. }
  472. start: Qt.point(0, 0)
  473. end: Qt.point(parent.width, 0)
  474. gradient: Gradient
  475. {
  476. GradientStop
  477. {
  478. position: 0.000
  479. color: Qt.rgba(0, 0, 1, 1)
  480. }
  481. GradientStop
  482. {
  483. position: 0.25
  484. color: Qt.rgba(0.25, 1, 0, 1)
  485. }
  486. GradientStop
  487. {
  488. position: 0.375
  489. color: Qt.rgba(0.375, 0.5, 0, 1)
  490. }
  491. GradientStop
  492. {
  493. position: 1.0
  494. color: Qt.rgba(1, 0.5, 0, 1)
  495. }
  496. }
  497. }
  498. }
  499. // Gradient colors for layer thickness (similar to parula colormap)
  500. Rectangle
  501. {
  502. id: thicknessGradient
  503. visible: (
  504. viewSettings.show_thickness_gradient
  505. )
  506. anchors.left: parent.left
  507. anchors.right: parent.right
  508. height: Math.round(UM.Theme.getSize("layerview_row").height * 1.5)
  509. border.width: UM.Theme.getSize("default_lining").width
  510. border.color: UM.Theme.getColor("lining")
  511. LinearGradient
  512. {
  513. anchors
  514. {
  515. left: parent.left
  516. leftMargin: UM.Theme.getSize("default_lining").width
  517. right: parent.right
  518. rightMargin: UM.Theme.getSize("default_lining").width
  519. top: parent.top
  520. topMargin: UM.Theme.getSize("default_lining").width
  521. bottom: parent.bottom
  522. bottomMargin: UM.Theme.getSize("default_lining").width
  523. }
  524. start: Qt.point(0, 0)
  525. end: Qt.point(parent.width, 0)
  526. gradient: Gradient
  527. {
  528. GradientStop
  529. {
  530. position: 0.000
  531. color: Qt.rgba(0, 0, 0.5, 1)
  532. }
  533. GradientStop
  534. {
  535. position: 0.25
  536. color: Qt.rgba(0, 0.375, 0.75, 1)
  537. }
  538. GradientStop
  539. {
  540. position: 0.5
  541. color: Qt.rgba(0, 0.75, 0.5, 1)
  542. }
  543. GradientStop
  544. {
  545. position: 0.75
  546. color: Qt.rgba(1, 0.75, 0.25, 1)
  547. }
  548. GradientStop
  549. {
  550. position: 1.0
  551. color: Qt.rgba(1, 1, 0, 1)
  552. }
  553. }
  554. }
  555. }
  556. // Gradient colors for flow (similar to jet colormap)
  557. Rectangle
  558. {
  559. id: jetGradient
  560. visible: (
  561. viewSettings.show_flow_rate_gradient
  562. )
  563. anchors.left: parent.left
  564. anchors.right: parent.right
  565. height: Math.round(UM.Theme.getSize("layerview_row").height * 1.5)
  566. border.width: UM.Theme.getSize("default_lining").width
  567. border.color: UM.Theme.getColor("lining")
  568. LinearGradient
  569. {
  570. anchors
  571. {
  572. left: parent.left
  573. leftMargin: UM.Theme.getSize("default_lining").width
  574. right: parent.right
  575. rightMargin: UM.Theme.getSize("default_lining").width
  576. top: parent.top
  577. topMargin: UM.Theme.getSize("default_lining").width
  578. bottom: parent.bottom
  579. bottomMargin: UM.Theme.getSize("default_lining").width
  580. }
  581. start: Qt.point(0, 0)
  582. end: Qt.point(parent.width, 0)
  583. gradient: Gradient
  584. {
  585. GradientStop
  586. {
  587. position: 0.0
  588. color: Qt.rgba(0, 0, 0.5, 1)
  589. }
  590. GradientStop
  591. {
  592. position: 0.125
  593. color: Qt.rgba(0, 0.0, 1.0, 1)
  594. }
  595. GradientStop
  596. {
  597. position: 0.25
  598. color: Qt.rgba(0, 0.5, 1.0, 1)
  599. }
  600. GradientStop
  601. {
  602. position: 0.375
  603. color: Qt.rgba(0.0, 1.0, 1.0, 1)
  604. }
  605. GradientStop
  606. {
  607. position: 0.5
  608. color: Qt.rgba(0.5, 1.0, 0.5, 1)
  609. }
  610. GradientStop
  611. {
  612. position: 0.625
  613. color: Qt.rgba(1.0, 1.0, 0.0, 1)
  614. }
  615. GradientStop
  616. {
  617. position: 0.75
  618. color: Qt.rgba(1.0, 0.5, 0, 1)
  619. }
  620. GradientStop
  621. {
  622. position: 0.875
  623. color: Qt.rgba(1.0, 0.0, 0, 1)
  624. }
  625. GradientStop
  626. {
  627. position: 1.0
  628. color: Qt.rgba(0.5, 0, 0, 1)
  629. }
  630. }
  631. }
  632. }
  633. }
  634. FontMetrics
  635. {
  636. id: fontMetrics
  637. font: UM.Theme.getFont("default")
  638. }
  639. }