diff --git a/gui/main-kf5.qml b/gui/main-kf5.qml index 8e7c0a3..2ecfe26 100644 --- a/gui/main-kf5.qml +++ b/gui/main-kf5.qml @@ -931,6 +931,8 @@ ApplicationWindow { Item { implicitHeight: callLayout.implicitHeight + 12 + HoverHandler { id: callHover } + Rectangle { anchors.fill: parent color: Qt.rgba(palette.text.r, palette.text.g, palette.text.b, 0.03) @@ -942,6 +944,20 @@ ApplicationWindow { } } + ToolButton { + anchors.top: parent.top + anchors.right: parent.right + anchors.margins: 4 + icon.name: "edit-copy" + implicitWidth: 24 + implicitHeight: 24 + opacity: callHover.hovered ? 0.8 : 0 + onClicked: chatModel.copyToClipboard(block.blockContent) + ToolTip.text: "Copy" + ToolTip.visible: hovered + Behavior on opacity { NumberAnimation { duration: 150 } } + } + ColumnLayout { id: callLayout x: 10 @@ -975,6 +991,8 @@ ApplicationWindow { Item { implicitHeight: toolLayout.implicitHeight + 12 + HoverHandler { id: toolHover } + Rectangle { anchors.fill: parent color: Qt.rgba(palette.text.r, palette.text.g, palette.text.b, 0.03) @@ -986,6 +1004,20 @@ ApplicationWindow { } } + ToolButton { + anchors.top: parent.top + anchors.right: parent.right + anchors.margins: 4 + icon.name: "edit-copy" + implicitWidth: 24 + implicitHeight: 24 + opacity: toolHover.hovered ? 0.8 : 0 + onClicked: chatModel.copyToClipboard(block.blockContent) + ToolTip.text: "Copy" + ToolTip.visible: hovered + Behavior on opacity { NumberAnimation { duration: 150 } } + } + ColumnLayout { id: toolLayout x: 10 diff --git a/gui/main.qml b/gui/main.qml index 9f12fd3..2e0c34b 100644 --- a/gui/main.qml +++ b/gui/main.qml @@ -936,6 +936,8 @@ ApplicationWindow { Item { implicitHeight: callLayout.implicitHeight + 12 + HoverHandler { id: callHover } + Rectangle { anchors.fill: parent color: Qt.rgba(palette.text.r, palette.text.g, palette.text.b, 0.03) @@ -947,6 +949,20 @@ ApplicationWindow { } } + ToolButton { + anchors.top: parent.top + anchors.right: parent.right + anchors.margins: 4 + icon.name: "edit-copy" + implicitWidth: 24 + implicitHeight: 24 + opacity: callHover.hovered ? 0.8 : 0 + onClicked: chatModel.copyToClipboard(block.blockContent) + ToolTip.text: "Copy" + ToolTip.visible: hovered + Behavior on opacity { NumberAnimation { duration: 150 } } + } + ColumnLayout { id: callLayout x: 10 @@ -980,6 +996,8 @@ ApplicationWindow { Item { implicitHeight: toolLayout.implicitHeight + 12 + HoverHandler { id: toolHover } + Rectangle { anchors.fill: parent color: Qt.rgba(palette.text.r, palette.text.g, palette.text.b, 0.03) @@ -991,6 +1009,20 @@ ApplicationWindow { } } + ToolButton { + anchors.top: parent.top + anchors.right: parent.right + anchors.margins: 4 + icon.name: "edit-copy" + implicitWidth: 24 + implicitHeight: 24 + opacity: toolHover.hovered ? 0.8 : 0 + onClicked: chatModel.copyToClipboard(block.blockContent) + ToolTip.text: "Copy" + ToolTip.visible: hovered + Behavior on opacity { NumberAnimation { duration: 150 } } + } + ColumnLayout { id: toolLayout x: 10