From 5ba31005c7a3af8d48f187c43831df4d2593094e Mon Sep 17 00:00:00 2001 From: VitorVieiraZ Date: Wed, 31 Jul 2024 19:06:28 -0300 Subject: [PATCH] font depends on text lineCount --- app/qml/components/private/MMToolbarShortButton.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/qml/components/private/MMToolbarShortButton.qml b/app/qml/components/private/MMToolbarShortButton.qml index a4777b241..3652de72b 100644 --- a/app/qml/components/private/MMToolbarShortButton.qml +++ b/app/qml/components/private/MMToolbarShortButton.qml @@ -72,14 +72,17 @@ Item { Text { id: text + width: parent.width text: root.text color: root.useDisabledVisual ? root.iconColorDisabled : root.iconColor - font: __style.t4 + font: lineCount === 1 ? __style.t4 : __style.t5 anchors.horizontalCenter: parent.horizontalCenter anchors.top: icon.bottom anchors.topMargin: root.buttonSpacing horizontalAlignment: Text.AlignHCenter - elide: Text.ElideMiddle + elide: Text.ElideRight + wrapMode: Text.Wrap + maximumLineCount: 2 } MouseArea {