diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-19 20:22:15 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-19 20:22:15 -0600 |
commit | 2f21bd8227384f88c535f605431e94011264a3fa (patch) | |
tree | e5ee6deeec3e617786c9fbc8a8f38e194d929e79 | |
parent | 96348408b0384a6835302524f00f0a6a238cde07 (diff) | |
download | kube-2f21bd8227384f88c535f605431e94011264a3fa.tar.gz kube-2f21bd8227384f88c535f605431e94011264a3fa.zip |
A column with one item doesn't make much sense
-rw-r--r-- | components/mailviewer/contents/ui/TextContent.qml | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/components/mailviewer/contents/ui/TextContent.qml b/components/mailviewer/contents/ui/TextContent.qml index b3f0ee69..5d8dbc90 100644 --- a/components/mailviewer/contents/ui/TextContent.qml +++ b/components/mailviewer/contents/ui/TextContent.qml | |||
@@ -27,10 +27,10 @@ Item { | |||
27 | property bool embedded: true | 27 | property bool embedded: true |
28 | property string type | 28 | property string type |
29 | 29 | ||
30 | height: textColumn.height | 30 | height: textEdit.height |
31 | 31 | ||
32 | Column { | 32 | TextEdit { |
33 | id: textColumn | 33 | id: textEdit |
34 | 34 | ||
35 | anchors { | 35 | anchors { |
36 | top: parent.top | 36 | top: parent.top |
@@ -38,28 +38,23 @@ Item { | |||
38 | right: parent.right | 38 | right: parent.right |
39 | } | 39 | } |
40 | 40 | ||
41 | spacing: 5 | 41 | selectionColor: Kube.Colors.highlightColor |
42 | 42 | ||
43 | TextEdit { | 43 | readOnly: true |
44 | width: parent.width | 44 | selectByMouse: true |
45 | selectionColor: Kube.Colors.highlightColor | ||
46 | 45 | ||
47 | readOnly: true | 46 | text: content |
48 | selectByMouse: true | 47 | wrapMode: TextEdit.Wrap |
48 | textFormat: Text.RichText | ||
49 | 49 | ||
50 | text: content | 50 | font.family: Kube.Font.fontFamily |
51 | wrapMode: TextEdit.Wrap | 51 | color: embedded ? Kube.Colors.disabledTextColor : Kube.Colors.textColor |
52 | textFormat: Text.RichText | 52 | onLinkActivated: Qt.openUrlExternally(link) |
53 | 53 | ||
54 | font.family: Kube.Font.fontFamily | 54 | MouseArea { |
55 | color: embedded ? Kube.Colors.disabledTextColor : Kube.Colors.textColor | 55 | anchors.fill: parent |
56 | onLinkActivated: Qt.openUrlExternally(link) | 56 | acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text |
57 | 57 | cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor | |
58 | MouseArea { | ||
59 | anchors.fill: parent | ||
60 | acceptedButtons: Qt.NoButton // we don't want to eat clicks on the Text | ||
61 | cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor | ||
62 | } | ||
63 | } | 58 | } |
64 | } | 59 | } |
65 | } | 60 | } |