D29740: [PC3 Button] Don't remain in a pressed state after press

2020-05-14 Thread Noah Davis
ndavis added a comment.


  In D29740#671221 , @filipf wrote:
  
  > The more I think about this the more it feels like a workaround. Presuming 
QQC2's behavior of leaving a pressed button focused after press is correct, 
perhaps we are at fault for providing the same svg for `focus-background` and 
`pressed`.
  
  
  That was one of the issues I was trying to fix while working on a new style 
for buttons in the QStyle.

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  dont-remain-pressed (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D29740

To: filipf, davidedmundson, mart, #plasma, ngraham
Cc: ndavis, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29740: [PC3 Button] Don't remain in a pressed state after press

2020-05-14 Thread Filip Fila
filipf added a comment.


  The more I think about this the more it feels like a workaround. Presuming 
QQC2's behavior of leaving a pressed button focused after press is correct, 
perhaps we are at fault for providing the same svg for `focus-background` and 
`pressed`.

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  dont-remain-pressed (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D29740

To: filipf, davidedmundson, mart, #plasma, ngraham
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29740: [PC3 Button] Don't remain in a pressed state after press

2020-05-14 Thread Nathaniel Graham
ngraham accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R242 Plasma Framework (Library)

BRANCH
  dont-remain-pressed (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D29740

To: filipf, davidedmundson, mart, #plasma, ngraham
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29740: [PC3 Button] Don't remain in a pressed state after press

2020-05-14 Thread Filip Fila
filipf added a dependent revision: D29741: [Logout] Port to QQC2 and PC3.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D29740

To: filipf, davidedmundson, mart, #plasma
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29740: [PC3 Button] Don't remain in a pressed state after press

2020-05-14 Thread Filip Fila
filipf edited the summary of this revision.
filipf edited the test plan for this revision.
filipf added reviewers: davidedmundson, mart, Plasma.

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D29740

To: filipf, davidedmundson, mart, #plasma
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29740: [PC3 Button] Don't remain in a pressed state after press

2020-05-14 Thread Filip Fila
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