Plasmoid: Changed IconWidget -> SvgItem to enable themes to change the icon

This commit is contained in:
Albert Vaca 2013-12-02 19:00:10 +01:00
parent a9aaa50992
commit c248a16b67

View file

@ -23,11 +23,34 @@ import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
import org.kde.plasma.core 0.1 as PlasmaCore import org.kde.plasma.core 0.1 as PlasmaCore
Item { Item {
id: view
anchors.fill: parent
//TODO: Use this to detect if we should be iconized or full size
function isConstrained() {
return (plasmoid.formFactor == Vertical || plasmoid.formFactor == Horizontal);
}
/*
PlasmaWidgets.IconWidget { PlasmaWidgets.IconWidget {
id: icon id: icon
Component.onCompleted: setIcon("smartphone"); Component.onCompleted: setIconByName("smartphone");
anchors.fill: parent anchors.fill: parent
} }
*/
PlasmaCore.Svg {
id: svg
imagePath: "icons/smartphone"
}
PlasmaCore.SvgItem {
anchors.fill: parent
svg: svg
height: view.height
width: view.width
}
MouseArea { MouseArea {
id: mouseArea id: mouseArea
@ -41,4 +64,5 @@ Item {
subText: "KDE Connect device notifications" subText: "KDE Connect device notifications"
} }
} }
}
}