SimulationViewMenuComponent.qml 26 KB

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