44
55import QtQuick
66import QtQuick.Layouts
7+ import QtQuick.Controls
78import QtQuick.Window
89import org.deepin.dtk 1.0 as D
910import org.deepin.dtk.style 1.0 as DS
@@ -12,6 +13,8 @@ DialogWindow {
1213 id: control
1314 width: DS .Style .aboutDialog .width
1415 height: DS .Style .aboutDialog .height
16+ topPadding: 0
17+ rightPadding: 0
1518
1619 property alias windowTitle: control .title
1720 property alias productName: productNameLabel .text
@@ -30,7 +33,7 @@ DialogWindow {
3033 RowLayout {
3134 id: contentView
3235 width: parent .width
33- implicitHeight : contentLayout . implicitHeight
36+ height : control . height - DS . Style . dialogWindow . titleBarHeight
3437
3538 D .LicenseInfoProvider {
3639 id: licensePathChecker
@@ -79,94 +82,109 @@ DialogWindow {
7982 visible: control .license !== " "
8083 }
8184 }
82- ColumnLayout {
85+ Flickable {
86+ id: rightContentView
87+ ScrollBar .vertical : ScrollBar {}
8388 Layout .alignment : Qt .AlignLeft | Qt .AlignTop
84- spacing: 10
8589 Layout .fillWidth : true
8690 Layout .fillHeight : true
87- Layout .rightMargin : 20
88- ColumnLayout {
89- spacing: 1
90- Label {
91- font: D .DTK .fontManager .t10
92- text: qsTr (" Version" )
93- }
94- Label {
95- id: versionLabel
96- font: D .DTK .fontManager .t8
97- wrapMode: Text .WordWrap
98- text: Qt .application .version
99- Layout .fillWidth : true
100- }
101- }
102- ColumnLayout {
103- spacing: 1
104- Label {
105- font: D .DTK .fontManager .t10
106- text: qsTr (" Homepage" )
107- }
108- Label {
109- id: websiteLabel
110- font: D .DTK .fontManager .t8
111- textFormat: Text .RichText
112- text: (control .websiteLink === " " || control .websiteName === " " ) ?
113- " " : control .__websiteLinkTemplate .arg (websiteLink).arg (control .websiteName )
114- wrapMode: Text .WordWrap
115- Layout .fillWidth : true
116-
117- MouseArea {
118- anchors .fill : parent
119- cursorShape: Qt .PointingHandCursor
120- acceptedButtons: Qt .NoButton
91+ clip: true
92+ contentWidth: width
93+ contentHeight: rightContentLayout .height
94+ boundsBehavior: Flickable .StopAtBounds
95+ flickableDirection: Flickable .VerticalFlick
96+
97+ Item {
98+ ColumnLayout {
99+ id: rightContentLayout
100+ width: rightContentView .width
101+ spacing: 10
102+
103+ ColumnLayout {
104+ spacing: 1
105+ Label {
106+ font: D .DTK .fontManager .t10
107+ text: qsTr (" Version" )
108+ }
109+ Label {
110+ id: versionLabel
111+ font: D .DTK .fontManager .t8
112+ wrapMode: Text .WordWrap
113+ text: Qt .application .version
114+ Layout .fillWidth : true
115+ }
121116 }
122- }
123- }
124- ColumnLayout {
125- spacing: 1
126- Label {
127- font: D .DTK .fontManager .t10
128- text: qsTr (" Description" )
129- }
130- Label {
131- id: descriptionLabel
132- Layout .fillWidth : true
133- font: D .DTK .fontManager .t8
134- wrapMode: Text .WordWrap
135- elide: Text .ElideRight
136- }
137- }
117+ ColumnLayout {
118+ spacing: 1
119+ Label {
120+ font: D .DTK .fontManager .t10
121+ text: qsTr (" Homepage" )
122+ }
123+ Label {
124+ id: websiteLabel
125+ font: D .DTK .fontManager .t8
126+ textFormat: Text .RichText
127+ text: (control .websiteLink === " " || control .websiteName === " " ) ?
128+ " " : control .__websiteLinkTemplate .arg (websiteLink).arg (control .websiteName )
129+ wrapMode: Text .WordWrap
130+ Layout .fillWidth : true
138131
139- ColumnLayout {
140- spacing: 1
141- Label {
142- font: D .DTK .fontManager .t10
143- text: qsTr (" Acknowledgements" )
144- }
145- Label {
146- id: acknowledgmentsLabel
147- text: {
148- var softwareText = qsTr (" open-source software" );
149- if (licensePathChecker .valid )
150- return qsTr (" Sincerely appreciate the %1 used." ).arg (control .__websiteLinkTemplate .arg (" -" ).arg (softwareText));
151- else
152- return qsTr (" Sincerely appreciate the %1 used." ).arg (softwareText);
132+ MouseArea {
133+ anchors .fill : parent
134+ cursorShape: Qt .PointingHandCursor
135+ acceptedButtons: Qt .NoButton
136+ }
137+ }
153138 }
154- textFormat: Text .RichText
155- Layout .fillWidth : true
156- font: D .DTK .fontManager .t8
157- wrapMode: Text .WordWrap
139+ ColumnLayout {
140+ spacing: 1
141+ Label {
142+ font: D .DTK .fontManager .t10
143+ text: qsTr (" Description" )
144+ }
145+ Label {
146+ id: descriptionLabel
147+ Layout .fillWidth : true
148+ font: D .DTK .fontManager .t8
149+ wrapMode: Text .WordWrap
158150 elide: Text .ElideRight
159-
160- onLinkActivated : function (link ) {
161- licenseDialogLoader .active = true
151+ }
162152 }
163153
164- HoverHandler {
165- cursorShape: acknowledgmentsLabel .hoveredLink !== " " ? Qt .PointingHandCursor : Qt .ArrowCursor
154+ ColumnLayout {
155+ Layout .bottomMargin : 30
156+ spacing: 1
157+ Label {
158+ font: D .DTK .fontManager .t10
159+ text: qsTr (" Acknowledgements" )
160+ }
161+ Label {
162+ id: acknowledgmentsLabel
163+ text: {
164+ var softwareText = qsTr (" open-source software" );
165+ if (licensePathChecker .valid )
166+ return qsTr (" Sincerely appreciate the %1 used." ).arg (control .__websiteLinkTemplate .arg (" -" ).arg (softwareText));
167+ else
168+ return qsTr (" Sincerely appreciate the %1 used." ).arg (softwareText);
169+ }
170+ textFormat: Text .RichText
171+ Layout .fillWidth : true
172+ font: D .DTK .fontManager .t8
173+ wrapMode: Text .WordWrap
174+ elide: Text .ElideRight
175+
176+ onLinkActivated : function (link ) {
177+ licenseDialogLoader .active = true
178+ }
179+
180+ HoverHandler {
181+ cursorShape: acknowledgmentsLabel .hoveredLink !== " " ? Qt .PointingHandCursor : Qt .ArrowCursor
182+ }
183+ }
166184 }
167185 }
168186 }
169- }
187+ }
170188
171189 Component .onCompleted : {
172190 websiteLabel .linkActivated .connect (D .ApplicationHelper .openUrl )
0 commit comments