Use FontMetrics component to calculate the line height

cura 8563
This commit is contained in:
casper 2021-12-01 11:45:30 +01:00
parent bf168388dd
commit bd9722654c

View file

@ -162,15 +162,20 @@ Window
}
}
FontMetrics
{
id: fontMetrics
font: UM.Theme.getFont("default")
}
Cura.TertiaryButton
{
text: catalog.i18nc("@info", "Search in the browser")
iconSource: UM.Theme.getIcon("LinkExternal")
isIconOnRightSide: true
height: UM.theme.getSize("standard_list_lineheight").height
textFont: UM.Theme.getFont("default")
height: fontMetrics.height
textFont: fontMetrics.font
textColor: UM.Theme.getColor("text")
onClicked: content.item && Qt.openUrlExternally(content.item.searchInBrowserUrl)