Commit bc0ca29b authored by Nate Graham's avatar Nate Graham
Browse files

Use metrics from Breeze for menu items

We can't read them dynamically right now, unfortunately. So the values
are hardcoded.

BUG: 447289
FIXED-IN: 5.91
parent 08f576b7
Pipeline #119745 passed with stage
in 35 seconds
......@@ -37,6 +37,9 @@ T.Menu {
}
return maxWidth;
}
spacing: 0 // Hardcoded to the Breeze theme value
interactive: ApplicationWindow.window ? contentHeight > ApplicationWindow.window.height : false
clip: true
currentIndex: control.currentIndex || 0
......
......@@ -25,7 +25,7 @@ T.MenuItem {
Layout.fillWidth: true
padding: Kirigami.Units.smallSpacing
verticalPadding: Math.floor(Kirigami.Units.smallSpacing * 1.5)
verticalPadding: 4 // Hardcoded to the Breeze theme value
hoverEnabled: !Kirigami.Settings.isMobile
Kirigami.MnemonicData.enabled: controlRoot.enabled && controlRoot.visible
......@@ -53,7 +53,7 @@ T.MenuItem {
visible: (controlRoot.ListView.view && controlRoot.ListView.view.hasIcons) || (controlRoot.icon != undefined && (controlRoot.icon.name.length > 0 || controlRoot.icon.source.length > 0))
source: controlRoot.icon ? (controlRoot.icon.name || controlRoot.icon.source) : ""
color: controlRoot.icon ? controlRoot.icon.color : "transparent"
Layout.preferredHeight: Math.max(Kirigami.Units.iconSizes.roundedIconSize(label.height), Kirigami.Units.iconSizes.small)
Layout.preferredHeight: Kirigami.Units.iconSizes.small
Layout.preferredWidth: Layout.preferredHeight
}
Label {
......@@ -94,7 +94,7 @@ T.MenuItem {
x: controlRoot.mirrored ? controlRoot.padding : controlRoot.width - width - controlRoot.padding
y: controlRoot.topPadding + (controlRoot.availableHeight - height) / 2
source: controlRoot.mirrored ? "go-next-symbolic-rtl" : "go-next-symbolic"
width: Math.max(Kirigami.Units.iconSizes.roundedIconSize(label.height), Kirigami.Units.iconSizes.small)
width: Kirigami.Units.iconSizes.small
height: width
visible: controlRoot.subMenu
}
......
Markdown is supported
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