Changeset View
Changeset View
Standalone View
Standalone View
src/qtquick/qml/private/MessageBoxSheet.qml
Show All 30 Lines | 26 | Kirigami.OverlaySheet { | |||
---|---|---|---|---|---|
31 | property list<QtObject> actions | 31 | property list<QtObject> actions | ||
32 | 32 | | |||
33 | showCloseButton: true | 33 | showCloseButton: true | ||
34 | header: Kirigami.Heading { | 34 | header: Kirigami.Heading { | ||
35 | id: headerLabel | 35 | id: headerLabel | ||
36 | QtLayouts.Layout.fillWidth: true | 36 | QtLayouts.Layout.fillWidth: true | ||
37 | elide: Text.ElideRight | 37 | elide: Text.ElideRight | ||
38 | } | 38 | } | ||
39 | // This is a TextEdit rather than a label, because the QQC Label control | ||||
40 | // does not support text selection (and it's very useful to be able to | ||||
41 | // select error texts for searchy purposes) | ||||
39 | contentItem: TextEdit { | 42 | contentItem: TextEdit { | ||
40 | id: messageLabel | 43 | id: messageLabel | ||
41 | QtLayouts.Layout.preferredWidth: Kirigami.Units.gridUnit * 10 | 44 | QtLayouts.Layout.preferredWidth: Kirigami.Units.gridUnit * 10 | ||
42 | QtLayouts.Layout.margins: Kirigami.Units.largeSpacing | 45 | QtLayouts.Layout.margins: Kirigami.Units.largeSpacing | ||
43 | wrapMode: Text.Wrap | 46 | wrapMode: Text.Wrap | ||
44 | readOnly: true | 47 | readOnly: true | ||
45 | selectByMouse: true | 48 | selectByMouse: true | ||
49 | color: Kirigami.Theme.textColor | ||||
50 | selectedTextColor: Kirigami.Theme.highlightedTextColor | ||||
51 | selectionColor: Kirigami.Theme.highlightColor | ||||
46 | } | 52 | } | ||
47 | footer: QtLayouts.RowLayout { | 53 | footer: QtLayouts.RowLayout { | ||
48 | Item { QtLayouts.Layout.fillWidth: true } | 54 | Item { QtLayouts.Layout.fillWidth: true } | ||
49 | Repeater { | 55 | Repeater { | ||
50 | model: component.actions; | 56 | model: component.actions; | ||
51 | QtControls.Button { | 57 | QtControls.Button { | ||
52 | action: modelData | 58 | action: modelData | ||
53 | Connections { | 59 | Connections { | ||
54 | target: action | 60 | target: action | ||
55 | onTriggered: component.close() | 61 | onTriggered: component.close() | ||
56 | } | 62 | } | ||
57 | } | 63 | } | ||
58 | } | 64 | } | ||
59 | } | 65 | } | ||
60 | } | 66 | } |