Changeset View
Changeset View
Standalone View
Standalone View
src/contents/ui/Bubble.qml
| Show All 15 Lines | |||||
| ItemDelegate { | ItemDelegate { | ||||
| id: upper | id: upper | ||||
| objectName: 'bubble' | objectName: 'bubble' | ||||
| default property var children | default property var children | ||||
| property var currentEvent: event | property var currentEvent: event | ||||
| property var menuContent: [] | property var menuContent: [] | ||||
| topPadding: 0 | |||||
| bottomPadding: 0 | |||||
| readonly property var bubbleSpacing: leftPadding + rightPadding | readonly property var bubbleSpacing: leftPadding + rightPadding | ||||
| readonly property double replyMaxHeight: Kirigami.Units.gridUnit * 7 | readonly property double replyMaxHeight: Kirigami.Units.gridUnit * 7 | ||||
| Layout.fillWidth: true | Layout.fillWidth: true | ||||
| Layout.preferredHeight: bubbleRootLayout.implicitHeight | |||||
| property var backgroundItem: Rectangle { | property var backgroundItem: Rectangle { | ||||
| anchors.fill: parent | anchors.fill: parent | ||||
| color: (hovered || isSelected) ? Kirigami.Theme.activeBackgroundColor : Kirigami.Theme.backgroundColor | color: (hovered || isSelected) ? Kirigami.Theme.activeBackgroundColor : Kirigami.Theme.backgroundColor | ||||
| } | } | ||||
| background: compactMode ? null : backgroundItem | background: compactMode ? null : backgroundItem | ||||
| property var eventSourcePopupComp: Component { | property var eventSourcePopupComp: Component { | ||||
| ▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | ItemDelegate { | ||||
| } | } | ||||
| function maybePopupMenu() { | function maybePopupMenu() { | ||||
| if (shouldPopupMenu()) { | if (shouldPopupMenu()) { | ||||
| menuComp.createObject(parent).popup(parent) | menuComp.createObject(parent).popup(parent) | ||||
| } | } | ||||
| } | } | ||||
| RowLayout { | contentItem: RowLayout { | ||||
| id: bubbleRootLayout | id: bubbleRootLayout | ||||
| anchors.left: parent.left | |||||
| anchors.right: parent.right | |||||
| property var replyToOrAnnotatedEventId: currentEvent.replyingToEventId || (currentEvent.relationType === 'm.annotation' ? currentEvent.relatedEventId : '') | property var replyToOrAnnotatedEventId: currentEvent.replyingToEventId || (currentEvent.relationType === 'm.annotation' ? currentEvent.relatedEventId : '') | ||||
| ColumnLayout { | ColumnLayout { | ||||
| Layout.fillWidth: true | Layout.fillWidth: true | ||||
| property var inReplyTo: MouseArea { | property var inReplyTo: MouseArea { | ||||
| Layout.fillWidth: true | Layout.fillWidth: true | ||||
| Layout.margins: 0 | Layout.margins: 0 | ||||
| ▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines | |||||