Plasmoid: Changed IconWidget -> SvgItem to enable themes to change the icon
This commit is contained in:
parent
a9aaa50992
commit
c248a16b67
1 changed files with 26 additions and 2 deletions
|
@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue