ngraham created this revision. ngraham added reviewers: Plasma, mart, davidedmundson. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: kde-frameworks-devel. ngraham requested review of this revision.
REVISION SUMMARY The PlasmaComponents2 `TextField` can draw its own Clear button, but the PlasmaComponents3 version can't, which impedes our ability to port code to use it without losing features. This patch implements the same built-in Clear button in the PlasmaComponents3 `TextField` so that it will be a drop-in replacement for the PlasmaComponents2 version for text fields that need a clear button. BUG: 396828 CCBUG: 396813 FIXED-IN: 5.49 TEST PLAN Tested with KRunner patched locally in `RunCommand.qml` to use the TextField from PlasmaComponents3 rather than PlasmaComponents2. Results: Placeholder text is now visible (See https://bugs.kde.org/show_bug.cgi?id=396813): There's still a clear button when you type some text (and it still works :)): REPOSITORY R242 Plasma Framework (Library) BRANCH pc3-textfield-clear-button (branched from master) REVISION DETAIL https://phabricator.kde.org/D14345 AFFECTED FILES src/declarativeimports/plasmacomponents3/TextField.qml To: ngraham, #plasma, mart, davidedmundson Cc: kde-frameworks-devel, michaelh, ngraham, bruns