Files
mail/ui/components/email-link-context-area.slint
T
2026-09-03 00:08:29 +00:00

36 lines
962 B
Plaintext

export component EmailLinkContextArea {
in property <string> url;
in property <bool> enabled: true;
callback open-link;
callback copy-link;
// Keep the left-click target below ContextMenuArea. The context item
// forwards left clicks but consumes right clicks, which gives us both
// normal link activation and a link-specific context menu.
TouchArea {
width: parent.width;
height: parent.height;
enabled: root.enabled;
clicked => { root.open-link(); }
mouse-cursor: pointer;
}
ContextMenuArea {
width: parent.width;
height: parent.height;
enabled: root.enabled;
Menu {
MenuItem {
title: @tr("Open link");
activated => { root.open-link(); }
}
MenuItem {
title: @tr("Copy link");
activated => { root.copy-link(); }
}
}
}
}