stickypad: adjust copy button size

This commit is contained in:
end-4
2025-11-14 14:26:02 +01:00
parent 02afa37da1
commit 42f29d47b4
@@ -18,6 +18,7 @@ OverlayBackground {
property string lastParsedCopylistText: "" property string lastParsedCopylistText: ""
property var parsedCopylistLines: [] property var parsedCopylistLines: []
property bool isClickthrough: false property bool isClickthrough: false
property real maxCopyButtonSize: 20
Component.onCompleted: { Component.onCompleted: {
stickypadFile.reload(); stickypadFile.reload();
@@ -161,7 +162,7 @@ OverlayBackground {
textFormat: TextEdit.PlainText textFormat: TextEdit.PlainText
background: null background: null
padding: 16 padding: 16
rightPadding: 44 + padding rightPadding: root.maxCopyButtonSize + padding
onTextChanged: { onTextChanged: {
if (stickypadInput.activeFocus) { if (stickypadInput.activeFocus) {
@@ -189,7 +190,7 @@ OverlayBackground {
delegate: RippleButton { delegate: RippleButton {
id: copyButton id: copyButton
required property var modelData required property var modelData
readonly property real lineHeight: Math.min(Math.max(modelData.height, Appearance.font.pixelSize.normal + 6), 40) readonly property real lineHeight: Math.min(Math.max(modelData.height, Appearance.font.pixelSize.normal + 6), root.maxCopyButtonSize)
readonly property real iconSizeLocal: Appearance.font.pixelSize.normal readonly property real iconSizeLocal: Appearance.font.pixelSize.normal
readonly property real hitPadding: 6 readonly property real hitPadding: 6
property bool justCopied: false property bool justCopied: false
@@ -198,7 +199,8 @@ OverlayBackground {
implicitWidth: lineHeight implicitWidth: lineHeight
buttonRadius: height / 2 buttonRadius: height / 2
y: modelData.y y: modelData.y
x: Math.max(stickypadInput.width - width - 16, 0) anchors.right: parent.right
anchors.rightMargin: 16
z: 5 z: 5
Timer { Timer {