ai messages: bouncy action buttons

This commit is contained in:
end-4 2025-05-24 21:00:13 +02:00
parent ca2c6ee470
commit a88119c3c0
2 changed files with 17 additions and 6 deletions

View file

@ -168,7 +168,7 @@ Rectangle {
MaterialSymbol {
id: notVisibleToModelText
anchors.centerIn: parent
iconSize: Appearance.font.pixelSize.larger
iconSize: Appearance.font.pixelSize.small
color: Appearance.colors.colSubtext
text: "visibility_off"
}
@ -177,14 +177,26 @@ Rectangle {
}
}
RowLayout {
ButtonGroup {
spacing: 5
AiMessageControlButton {
id: copyButton
buttonIcon: "content_copy"
buttonIcon: activated ? "inventory" : "content_copy"
onClicked: {
Hyprland.dispatch(`exec wl-copy '${StringUtils.shellSingleQuoteEscape(root.messageData.content)}'`)
copyButton.activated = true
copyIconTimer.restart()
}
Timer {
id: copyIconTimer
interval: 1500
repeat: false
onTriggered: {
copyButton.activated = false
}
}
StyledToolTip {
content: qsTr("Copy")

View file

@ -7,14 +7,13 @@ import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
RippleButton {
GroupButton {
id: button
property string buttonIcon
property bool activated: false
toggled: activated
implicitHeight: 30
implicitWidth: 30
baseWidth: height
contentItem: MaterialSymbol {
horizontalAlignment: Text.AlignHCenter