Commit Graph

14 Commits

Author SHA1 Message Date
Harald Sitter
0a45d9792d reload icon theme for iconitemtest as well 2016-04-27 13:34:43 +02:00
David Rosca
fd46322300 IconItem: Schedule pixmap update when window changes
QQuickItem::polish is not called when window changes.

Regression from 344d04e230

REVIEW: 127342
2016-03-12 13:01:07 +01:00
David Rosca
46a1181587 IconItem: Animate active and enabled change even with animations disabled
animated: false should disable only animation when changing source,
we still want the hover and enabled animations.
Also fix docs.

REVIEW: 127302
2016-03-11 14:10:59 +01:00
Kai Uwe Broulik
344d04e230 [Icon Item] Don't animate from previous pixmap when it has been invisible
We have a lot of reusable singletons that are just hidden when not needed, such
as the OSD. IconItem, however, will always fade from the previous state, even if
the previous action happened minutes ago.

This fixes for example changing the volume and then later changing the brightness
where you could see the OSD animating from the volume icon.

REVIEW: 122859
2016-03-10 13:01:29 +01:00
Kai Uwe Broulik
3b115e6d90 [Icon Item] Don't call loadPixmap in setColorGroup
Changing the color group of an Svg emits repaintNeeded which will then
cause it to schedule a pixmap update anyway. Includes a unittest.

REVIEW: 127313
2016-03-10 12:58:18 +01:00
David Rosca
ab302872d3 Fix iconitem test - second try 2016-03-06 16:13:54 +01:00
David Rosca
fa1ca80281 Fix iconitem test
Icon name for QIcon must be from test-theme
2016-03-05 11:05:52 +01:00
David Rosca
978b8b3b87 IconItem: Don't overwrite source when using QIcon::name()
source should always return the same value as it was assigned.
Also removed duplicated code (empty sourceString is now handled
as if the source couldn't be converted to any type).

REVIEW: 127282
2016-03-04 23:44:57 +01:00
David Edmundson
531b7f3a95 Add unit test for loading QPixmaps and QImages into IconItem
REVIEW: 127269
2016-03-04 00:20:35 +00:00
David Rosca
37fde3974e IconItemTest: Skip when grabToImage fails 2016-02-29 22:29:51 +01:00
David Rosca
30368e1d45 IconItem: Fix changing color of svg icons loaded from icon theme
Connect to repaintNeeded when creating Plasma::Svg.

REVIEW: 127207
2016-02-29 22:28:58 +01:00
Weng Xuetian
066cf0a0d7 Fix svg iconPath resolving in IconItem
This fixes iconPath is not correctly set when its size changes.

REVIEW: 127201
2016-02-29 13:05:48 -08:00
David Rosca
3c8cb82d44 Fix build with Qt < 5.6 2016-02-28 10:36:57 +01:00
David Rosca
526915895b Add autotests for IconItem
Add some tests for IconItem.
Also found one issue in animation when quickly changing source, first frame
will be rendered with wrong icon.

REVIEW: 127103
2016-02-27 21:24:45 +01:00