123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- // Copyright (c) 2023 UltiMaker
- // Cura is released under the terms of the LGPLv3 or higher.
- import QtQuick 2.2
- import QtQuick.Controls 2.9
- import UM 1.5 as UM
- import Cura 1.5 as Cura
- UM.Dialog
- {
- id: base
- //: About dialog title
- title: catalog.i18nc("@title:window The argument is the application name.", "About %1").arg(CuraApplication.applicationDisplayName)
- minimumWidth: 500 * screenScaleFactor
- minimumHeight: 700 * screenScaleFactor
- width: minimumWidth
- height: minimumHeight
- backgroundColor: UM.Theme.getColor("main_background")
- Rectangle
- {
- id: header
- width: parent.width + 2 * margin // margin from Dialog.qml
- height: childrenRect.height + topPadding
- anchors.top: parent.top
- anchors.topMargin: -margin
- anchors.horizontalCenter: parent.horizontalCenter
- property real topPadding: UM.Theme.getSize("wide_margin").height
- color: UM.Theme.getColor("main_window_header_background")
- Image
- {
- id: logo
- width: (base.minimumWidth * 0.85) | 0
- height: (width * (UM.Theme.getSize("logo").height / UM.Theme.getSize("logo").width)) | 0
- source: UM.Theme.getImage("logo")
- sourceSize.width: width
- sourceSize.height: height
- fillMode: Image.PreserveAspectFit
- anchors.top: parent.top
- anchors.topMargin: parent.topPadding
- anchors.horizontalCenter: parent.horizontalCenter
- UM.I18nCatalog{id: catalog; name: "cura"}
- }
- UM.Label
- {
- id: version
- text: catalog.i18nc("@label","version: %1").arg(UM.Application.version)
- font: UM.Theme.getFont("large_bold")
- color: UM.Theme.getColor("button_text")
- anchors.right : logo.right
- anchors.top: logo.bottom
- anchors.topMargin: (UM.Theme.getSize("default_margin").height / 2) | 0
- }
- }
- UM.Label
- {
- id: description
- width: parent.width
- //: About dialog application description
- text: catalog.i18nc("@label","End-to-end solution for fused filament 3D printing.")
- font: UM.Theme.getFont("system")
- wrapMode: Text.WordWrap
- anchors.top: header.bottom
- anchors.topMargin: UM.Theme.getSize("default_margin").height
- }
- UM.Label
- {
- id: creditsNotes
- width: parent.width
- //: About dialog application author note
- text: catalog.i18nc("@info:credit","Cura is developed by UltiMaker in cooperation with the community.\nCura proudly uses the following open source projects:")
- font: UM.Theme.getFont("system")
- wrapMode: Text.WordWrap
- anchors.top: description.bottom
- anchors.topMargin: UM.Theme.getSize("default_margin").height
- }
- ListView
- {
- id: projectsList
- anchors.top: creditsNotes.bottom
- anchors.topMargin: UM.Theme.getSize("default_margin").height
- width: parent.width
- height: base.height - y - (2 * UM.Theme.getSize("default_margin").height + closeButton.height)
- ScrollBar.vertical: UM.ScrollBar
- {
- id: projectsListScrollBar
- }
- delegate: Row
- {
- spacing: UM.Theme.getSize("narrow_margin").width
- UM.Label
- {
- text: model.name
- width: (projectsList.width * 0.50) | 0
- elide: Text.ElideRight
- }
- UM.Label
- {
- text: model.version
- elide: Text.ElideRight
- width: ((projectsList.width * 0.5) | 0) - parent.spacing * 2 - projectsListScrollBar.width
- }
- UM.Label
- {
- text: model.license
- elide: Text.ElideRight
- width: (projectsList.width * 0.25) | 0
- }
- }
- model: ListModel
- {
- id: projectsModel
- }
- Component.onCompleted:
- {
- {% for dep in dependencies %}projectsModel.append({ name: "{{ dep.name }}", version: "{{ dep.version }}", license: "{{ dep.license }}" });
- {% endfor %}
- }
- }
- rightButtons: Cura.TertiaryButton
- {
- //: Close about dialog button
- id: closeButton
- text: catalog.i18nc("@action:button", "Close")
- onClicked: reject()
- }
- }
|