Commit f6e18be8 authored by Noah Davis's avatar Noah Davis 🌵
Browse files

[ToolButton] Go back to using Kirigami.Icon for menu indicator

The icon will be consistent with the contentItem's icon.
parent 10433c4b
......@@ -73,25 +73,24 @@ T.ToolButton {
text: control.Kirigami.MnemonicData.richTextLabel
}
// Using a Loader here reduces the RAM usage
indicator: Loader {
property alias iconHeight: control.icon.height
property alias iconWidth: control.icon.width
anchors {
right: control.right
rightMargin: control.rightPadding
verticalCenter: control.verticalCenter
}
sourceComponent: control.__showMenuArrow ? indicatorComponent : null
}
Component {
id: indicatorComponent
PaintedSymbol {
implicitHeight: {
let h = Kirigami.Units.symbolSize(Kirigami.Units.gridUnit)
return h + penWidth*2
visible: control.__showMenuArrow
active: visible
sourceComponent: Component {
Kirigami.Icon {
anchors.centerIn: parent
implicitHeight: iconHeight
implicitWidth: iconWidth
source: "arrow-down"
}
implicitWidth: implicitHeight
color: Kirigami.Theme.textColor
symbolType: /*visible && control.checked ? PaintedSymbol.UpArrow :*/ PaintedSymbol.DownArrow
}
}
......
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