filipf created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. filipf requested review of this revision.
REVISION SUMMARY We have two interfering button background items right now: - surfaceNormal when it has activeFocus and is using using the "focus-background" item - surfacePressed After a button is pressed surfacePressed correctly disappears but surfaceNormal remains in the "focus-background" state, thereby making the button still look pressed. The problem is that the button still has activeFocus even after a press. To solve this we switch the "focus-background" to only show up on visualFocus. Per Qt documentation on visual Focus: "In general, for visualizing key focus, this property is preferred over Item::activeFocus. This ensures that key focus is only visualized when interacting with keys - not when interacting via touch or mouse." Given that we have surfacePressed for focus accomplished with a mouse or touch, visualFocus will only detect tabbing and therefore the button no longer remains pressed after a press and behaves like its PC2 counterpart. REPOSITORY R242 Plasma Framework (Library) BRANCH dont-remain-pressed (branched from master) REVISION DETAIL https://phabricator.kde.org/D29740 AFFECTED FILES src/declarativeimports/plasmacomponents3/Button.qml To: filipf Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns