Bug 375137

Summary: Rounding error for pastebin button results with a bit different look
Product: [Unmaintained] kdeplasma-addons Reporter: soee <kontakt>
Component: QuickShareAssignee: Aleix Pol <aleixpol>
Status: RESOLVED FIXED    
Severity: normal CC: kde, plasma-bugs-null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description soee 2017-01-16 13:49:52 UTC
The Pastebin button has some strange style (different than other) due to rounding problem. See how it behaves on drag/scroll: https://www.youtube.com/watch?v=vtjMTSoVj-8
Comment 1 Aleix Pol 2017-01-16 16:01:11 UTC
It's using PlasmaComponents.Button
Comment 2 David Edmundson 2017-01-16 22:14:18 UTC
Right, but how that button is aligned is still the responsibility of the plasmoid.

This code contains: 

ListItem {
height: button * 1.2
}

Then you centre the button within it. That's going to result in a non-pixel aligned value.

Patch on Phab.
Comment 3 David Edmundson 2017-01-16 22:34:29 UTC
Git commit 407168327b93a68865fa8367401d20673360e7c7 by David Edmundson.
Committed on 16/01/2017 at 22:34.
Pushed by davidedmundson into branch 'Plasma/5.9'.

Fix pixel alignment and non-standard height in QuickShare delegate

Summary:
The current code had height: button.height * 1.2
then centered the button within it, which can result in non-pixel
aligned y values, leading to rendering issues.

We don't need to specify the height explicitly, it's done by ListItem if
we fix the underlying binding loop. This gives the delegate the correct
size of button height + margins.

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D4166

M  +2    -2    applets/quickshare/plasmoid/contents/ui/ShareDialog.qml

https://commits.kde.org/kdeplasma-addons/407168327b93a68865fa8367401d20673360e7c7