Commit fe005203 authored by ivan tkachenko's avatar ivan tkachenko Committed by Nate Graham
Browse files

[applets/appmenu] Combine three FrameSvgItem into one

Not sure how much (if at all) this makes sense performance-wise, but at
least the code looks cleaner and there are no duplicating components
anymore.

State enum is mutually exclusive as it is, so there's no way there could
have been more than one FrameSvgItem on screen at a time.
parent e37baaeb
......@@ -46,23 +46,12 @@ AbstractButton {
PlasmaCore.FrameSvgItem {
id: rest
anchors.fill: parent
visible: background.state === MenuDelegate.State.Rest
imagePath: "widgets/menubaritem"
prefix: "normal"
}
PlasmaCore.FrameSvgItem {
id: hover
anchors.fill: parent
visible: background.state === MenuDelegate.State.Hover
imagePath: "widgets/menubaritem"
prefix: "hover"
}
PlasmaCore.FrameSvgItem {
id: down
anchors.fill: parent
visible: background.state === MenuDelegate.State.Down
imagePath: "widgets/menubaritem"
prefix: "pressed"
prefix: switch (background.state) {
case MenuDelegate.State.Down: return "pressed";
case MenuDelegate.State.Hover: return "hover";
case MenuDelegate.State.Rest: return "normal";
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment