<table><tr><td style="">filipf edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-n5irq4ioor2h6ax/">(Show Details)</a><br />filipf edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-3li7drmekcj2dq3/">(Show Details)</a><br />filipf added reviewers: davidedmundson, mart, Plasma.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29740">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;">We have two interfering button background items right now:<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">- </span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">- `</span>surfaceNormal<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span> when it has <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span>activeFocus<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span> and is using using the "focus-background" item<br />
<span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">- </span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">- `</span>surfacePressed<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span><br />
<br />
After a button is pressed <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span>surfacePressed<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span> correctly disappears but <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span>surfaceNormal<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span> remains in the "focus-background" state, thereby making the button still look pressed.<br />
<br />
The problem is that the button still has <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span>activeFocus<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span> even after a press.<br />
<br />
To solve this we switch the "focus-background" to only show up on <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span>visualFocus<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span>. Per Qt documentation on visual Focus:<div style="padding: 8px 0;">...</div>Given that we have <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span>surfacePressed<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span> for focus accomplished with a mouse or touch, <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span>visualFocus<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">`</span> will only detect tabbing and therefore the button no longer remains pressed after a press and <span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">now </span>behaves like its PC2 counterpart.</div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Tabbed and pressed a PC3 button.</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R242 Plasma Framework (Library)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29740">https://phabricator.kde.org/D29740</a></div></div><br /><div><strong>To: </strong>filipf, davidedmundson, mart, Plasma<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns<br /></div>