ensure the text fits properly and better control over text size

This commit is contained in:
Chris Cochrun 2022-09-16 16:45:18 -05:00
parent b6e29352d9
commit e05beb3857
2 changed files with 3 additions and 2 deletions

View file

@ -132,13 +132,14 @@ Item {
id: lyrics id: lyrics
text: root.text text: root.text
/* text: root.width / textSize */ /* text: root.width / textSize */
font.pixelSize: root.width / root.textSize * 3 font.pixelSize: root.width / 1000 * root.textSize
/* minimumPointSize: 5 */ /* minimumPointSize: 5 */
fontSizeMode: Text.Fit fontSizeMode: Text.Fit
font.family: chosenFont font.family: chosenFont
horizontalAlignment: hTextAlignment horizontalAlignment: hTextAlignment
verticalAlignment: vTextAlignment verticalAlignment: vTextAlignment
style: Text.Raised style: Text.Raised
wrapMode: Text.WordWrap
anchors.fill: parent anchors.fill: parent
anchors.topMargin: 10 anchors.topMargin: 10
anchors.bottomMargin: 10 anchors.bottomMargin: 10

View file

@ -40,7 +40,7 @@ Item {
id: fontSizeBox id: fontSizeBox
editable: true editable: true
from: 5 from: 5
to: 72 to: 150
hoverEnabled: true hoverEnabled: true
onValueModified: updateFontSize(value) onValueModified: updateFontSize(value)
} }