Disable cut/paste action when textedit is disabled

(Too bad that we can't hide these actions)
This commit is contained in:
Laurent Montel 2025-04-18 16:35:28 +02:00 committed by Olivier Goffart
parent 706bd3e984
commit eafa9bae12

View file

@ -62,19 +62,32 @@ export component TextEditBase inherits Rectangle {
Menu {
MenuItem {
title: @tr("Cut");
activated => { text-input.cut(); }
enabled: root.enabled;
activated => {
text-input.cut();
}
}
MenuItem {
title: @tr("Copy");
activated => { text-input.copy(); }
activated => {
text-input.copy();
}
}
MenuItem {
title: @tr("Paste");
activated => { text-input.paste(); }
enabled: root.enabled;
activated => {
text-input.paste();
}
}
MenuItem {
title: @tr("Select All");
activated => { text-input.select-all(); }
activated => {
text-input.select-all();
}
}
}
@ -123,7 +136,6 @@ export component TextEditBase inherits Rectangle {
}
}
}
}
placeholder := Text {