D14234: [Folder View] Improve file name text rendering

2018-07-20 Thread Kai Uwe Broulik
This revision was automatically updated to reflect the committed changes.
Closed by commit R119:5fca2b32ce5b: [Folder View] Improve file name text 
rendering (authored by broulik).

CHANGED PRIOR TO COMMIT
  https://phabricator.kde.org/D14234?vs=38097&id=38125#toc

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14234?vs=38097&id=38125

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

AFFECTED FILES
  containments/desktop/package/contents/ui/FolderItemDelegate.qml

To: broulik, #plasma, hein, davidedmundson, ngraham
Cc: Zren, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D14234: [Folder View] Improve file name text rendering

2018-07-20 Thread Eike Hein
hein added a comment.


  It kind of sucks we have to do this, we have a lot of different UIs we'd have 
to copy-paste this fix too, but after a few minutes of mulling I didn't come up 
with a better idea :/

REPOSITORY
  R119 Plasma Desktop

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

To: broulik, #plasma, hein, davidedmundson, ngraham
Cc: Zren, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D14234: [Folder View] Improve file name text rendering

2018-07-19 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a comment.
This revision is now accepted and ready to land.


  Looks better with fractional scaling and doesn't regress at all for 1x 
scaling. Drop shadows are still rendered. Code looks good.

REPOSITORY
  R119 Plasma Desktop

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

To: broulik, #plasma, hein, davidedmundson, ngraham
Cc: Zren, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D14234: [Folder View] Improve file name text rendering

2018-07-19 Thread Chris Holland
Zren added a comment.


  I tested the `x: -main.x % 1` code.
  
  Before:
  F6120560: 2018-07-19___13-46-20.png 
  
  After:
  F6120562: 2018-07-19___13-47-29.png 

REPOSITORY
  R119 Plasma Desktop

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

To: broulik, #plasma, hein, davidedmundson, ngraham
Cc: Zren, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D14234: [Folder View] Improve file name text rendering

2018-07-19 Thread Kai Uwe Broulik
broulik updated this revision to Diff 38097.
broulik added a comment.


  - Don't even bother creating the `DropShadow` if not supported

REPOSITORY
  R119 Plasma Desktop

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14234?vs=38096&id=38097

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

AFFECTED FILES
  containments/desktop/package/contents/ui/FolderItemDelegate.qml

To: broulik, #plasma, hein, davidedmundson, ngraham
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart


D14234: [Folder View] Improve file name text rendering

2018-07-19 Thread Kai Uwe Broulik
broulik created this revision.
broulik added reviewers: Plasma, hein, davidedmundson, ngraham.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.
broulik requested review of this revision.

REVISION SUMMARY
  `GridView` pads out its delegate to ensure a uniform grid. This, however, 
causes items to be placed on fractional pixels, leading to blurry rendering and 
uneven hinting.
  Instead of adjusting padding calculation to return whole pixels, which will 
again cause a gap at the right side of the screen, since there's 20 icons in a 
row, slightly shift the delegate contents to move them back to whole pixels.
  Moreover, `DropShadow` renders the entire item with a drop shadow, so keeping 
the `Label` visible results in two labels ontop of each other leading to bolder 
text.

TEST PLAN
  - Verified with gamma ray that the `Label` is now placed at integer scene 
coordinates
  - Font rendering does look a lot nicer, especially in second and lines 
further down
  - Verified that in software rendering Label renders fine just without a shadow
  - Verified that label hides when renaming file
  - Verified gap at the right of the screen is virtually unchanged

REPOSITORY
  R119 Plasma Desktop

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

AFFECTED FILES
  containments/desktop/package/contents/ui/FolderItemDelegate.qml

To: broulik, #plasma, hein, davidedmundson, ngraham
Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol, mart