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

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Fri Mar 15 15:29:23 GMT 2019


kossebau added a comment.


  An alternative approach might be to do instead
  
    //if tiling horizontally
    if (m_border == FrameSvg::TopBorder || m_border == FrameSvg::BottomBorder || m_border == FrameSvg::NoBorder) {
        textureRect.setWidth(qMax(1, nodeRect.width() / m_elementNativeSize.width()));
    }
    //if tiling vertically
    if (m_border == FrameSvg::LeftBorder || m_border == FrameSvg::RightBorder || m_border == FrameSvg::NoBorder) {
        textureRect.setHeight(qMax(1, nodeRect.height() / m_elementNativeSize.height()));
    }
  
  i.e. to use `1` as minimum, and continue to use full multiples. That might help potential themes where the subparts should properly align on the subpart borders (think something like sine wave), at the cost of having things being shrunk to fit.
  
  Both solutions are fine for the Fluffy Bunny theme :)
  
  Perhaps something to control via another flag? :P

REPOSITORY
  R242 Plasma Framework (Library)

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

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


More information about the Kde-frameworks-devel mailing list