File tree Expand file tree Collapse file tree 2 files changed +30
-27
lines changed Expand file tree Collapse file tree 2 files changed +30
-27
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import QtQuick 2.15
6
6
import QtQuick.Controls 2.15
7
7
import QtQuick.Layouts 1.15
8
8
9
- Control {
9
+ AbstractButton {
10
10
id: root
11
11
required property string link
12
12
property string description: " "
@@ -29,7 +29,6 @@ Control {
29
29
color: Theme .color .neutral7
30
30
textFormat: Text .RichText
31
31
text: " <style>a:link { color: " + Theme .color .neutral7 + " ; text-decoration: none;}</style>" + " <a href=\" " + link + " \" >" + root .description + " </a>"
32
- onLinkActivated: Qt .openUrlExternally (link)
33
32
}
34
33
}
35
34
Loader {
@@ -42,8 +41,9 @@ Control {
42
41
icon .height : root .iconHeight
43
42
icon .width : root .iconWidth
44
43
background: null
45
- onClicked: Qt . openUrlExternally (link )
44
+ onClicked: root . clicked ( )
46
45
}
47
46
}
48
47
}
48
+ onClicked: Qt .openUrlExternally (link)
49
49
}
Original file line number Diff line number Diff line change @@ -6,39 +6,42 @@ import QtQuick 2.15
6
6
import QtQuick.Controls 2.15
7
7
import QtQuick.Layouts 1.15
8
8
9
- ColumnLayout {
9
+ AbstractButton {
10
10
id: root
11
11
property bool last: parent && root === parent .children [parent .children .length - 1 ]
12
12
required property string header
13
13
property alias actionItem: action_loader .sourceComponent
14
14
property string description
15
15
16
- spacing: 20
17
- RowLayout {
18
- Header {
19
- Layout .fillWidth : true
20
- center: false
21
- header: root .header
22
- headerSize: 18
23
- description: root .description
24
- descriptionSize: 15
25
- descriptionMargin: 0
16
+ contentItem: ColumnLayout {
17
+ spacing: 20
18
+ width: parent .width
19
+ RowLayout {
20
+ Header {
21
+ Layout .fillWidth : true
22
+ center: false
23
+ header: root .header
24
+ headerSize: 18
25
+ description: root .description
26
+ descriptionSize: 15
27
+ descriptionMargin: 0
28
+ }
29
+ Loader {
30
+ id: action_loader
31
+ active: true
32
+ visible: active
33
+ sourceComponent: root .actionItem
34
+ }
26
35
}
27
36
Loader {
28
- id: action_loader
29
- active: true
37
+ Layout .fillWidth : true
38
+ Layout .columnSpan : 2
39
+ active: ! last
30
40
visible: active
31
- sourceComponent: root .actionItem
32
- }
33
- }
34
- Loader {
35
- Layout .fillWidth : true
36
- Layout .columnSpan : 2
37
- active: ! last
38
- visible: active
39
- sourceComponent: Rectangle {
40
- height: 1
41
- color: Theme .color .neutral5
41
+ sourceComponent: Rectangle {
42
+ height: 1
43
+ color: Theme .color .neutral5
44
+ }
42
45
}
43
46
}
44
47
}
You can’t perform that action at this time.
0 commit comments