D19787: FrameSvgItem: fix textureRect for tiled subitems to not shrink to 0

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Sat Mar 16 07:46:16 GMT 2019


kossebau added a comment.


  After a first coffee, I realize this very logic actually already does upsampling all the time, given it takes the floor of the nodesize/samplesize expression, not the ceiling. And with eyes made sensitive, I see this now all the time.
  
  Rereading the CSS3 spec, it seems they actually want the proposed `qRound` (+ excluding 0 as nearest integer), so the actual proper algorithm to meet the "round" value of "border-image-repeat" would be:
  
    textureRect.setWidth(qMax(1, qRound((qreal)nodeRect.width() / m_elementNativeSize.width())));
  
  So we still have upsampling, at least with the pixmap material provided by Fluffy Bunny, which seems 1:1 pixels, so not a happy camper yet here for my mission to actually bring Fluffy Bunny back:
  F6695912: Screenshot_20190316_075738.png <https://phabricator.kde.org/F6695912>
  
  Then, looking closer at screenshots of Fluffy Bunny from Plasma4 times, I cannot see any scaling/stretching at all:
  https://frinring.files.wordpress.com/2009/01/x-bar.png
  https://liquidat.files.wordpress.com/2008/06/fluffybunny.png
  
  Other tiling based themes indicate that indeed no stretching was done:
  https://liquidat.files.wordpress.com/2008/06/slickback.png
  
  So... with all that in mind and yet another coffee, IMHO we should restore the logic of Plasma4 then. And if somebody wants the "round" repeat style, we should introduce another hint for them. 
  Returning to the initial logic, things look like this, which I favour over the other:
  F6695944: Screenshot_20190316_084031.png <https://phabricator.kde.org/F6695944>
  Updating patch next.

REPOSITORY
  R242 Plasma Framework (Library)

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

To: kossebau, #plasma, mart
Cc: apol, sitter, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190316/7a048032/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list