Porting the Color Picker applet to PlasmaComponents3, a visual regression is seen: clicking on one of the toolbuttons retains the focus ring for the toolbutton. This is what we want most of the time, but it's inappropriate when the applet is on a panel, as panel applets never get focus. Also, the focus ring looks ugly here because it never goes away, so you wind up with a random inaccurate focus ring on your panel. Either we could do something fancy to detect this condition, or just add a property that will disable showing the focus ring when clicked.
Created attachment 130267 [details] How it looks after being clicked
Not only on a panel but also when the widget is on the desktop
Also happens with toolbutton3.qml compared to toolbutton.qml
The PC3 Button gains activeFocus while the PC2 Button doesn't
One last note I think this is a fundamental difference in Quick Controls 1 and 2. 1 had activeFocusOnPress which defaulted to false while QQC2 gains focus on press (but not visualized in qqc2-desktop-style).
Git commit 3e225d8664bc994bffbc3b10805162ae32da3734 by David Redondo. Committed on 11/08/2020 at 06:58. Pushed by davidre into branch 'master'. Only draw the focus indicator when we got focus via the keyboard QQC2 controls gain activeFocus on press this is a difference to controls 1 which had activeFocusOnPress property that defaulted to false. qqc2-desktop-style also only sets the focus flag if it was gained via keyboard (kquickstyleitem.cpp:705). M +4 -2 src/declarativeimports/plasmacomponents3/ToolButton.qml https://invent.kde.org/frameworks/plasma-framework/commit/3e225d8664bc994bffbc3b10805162ae32da3734
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/244
Git commit f52c706be9c5e5262204bfcda3ed0567b6d8f019 by Fushan Wen. Committed on 16/10/2022 at 15:11. Pushed by fusionfuture into branch 'master'. applets/colorpicker: port to `PC3.ToolButton` and `QtQuick.DropArea` Related: bug 424448 A +112 -0 applets/colorpicker/package/contents/ui/ColorCircle.qml [License: GPL(v2.0+)] M +16 -105 applets/colorpicker/package/contents/ui/main.qml https://invent.kde.org/plasma/kdeplasma-addons/commit/f52c706be9c5e5262204bfcda3ed0567b6d8f019