-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103685/
-----------------------------------------------------------

Review request for Plasma and Aaron J. Seigo.


Description
-------

With the iconshrink patch, I introduced an issue with the icon text clipping. 
The thing is, the iconview items painting code is written in a way that the 
text will accomodate fully only if the icon touches the top of the rect r 
(iconview.cpp:1050), else the text will get clipped. TO achieve this effect, 
Qt:AlignTop had been used. I changed that to Qt:AlignCenter and introduced the 
issue.

This patch tries to locate the icon at the top border of the rect r (as it had 
been before the commit), but when the icon shrinks, it moves towards its own 
center, same as the first commit.

ir.moveTop(r.top());

Now when the icon is shrinked, it is moved down by half the difference between 
its normal size and its shrinked size, which is perfectly logical.

ir.translate(0, (m_drawIconShrinked && m_pressedIndex == index) ? 
0.05*option.decorationSize.height() : 0);

This centers the icon nicely around its own center. The text keeps "scaling" 
towards the top as well, as it had been before the commit. In the idle state, 
the text is accomodated fully, as it had been before the commit.


Diffs
-----

  plasma/applets/folderview/iconview.cpp d295588 

Diff: http://git.reviewboard.kde.org/r/103685/diff/diff


Testing
-------

This is not final, there is 1 pixel offset bug in the halo drawing code. I'm 
going to sleep today, this review request is just to show that I'm aware that I 
have screwed things up and am working on getting the proper patch done.


Thanks,

Ignat Semenov

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel

Reply via email to