From 7061ec2ed8b2446f9619ac32eeedda31848357b2 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 15 Dec 2023 11:39:49 -0600 Subject: [PATCH] adding some debug info and fixing font sizes? --- justfile | 2 +- src/qml/presenter/Slide.qml | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index aa85966..266d18f 100644 --- a/justfile +++ b/justfile @@ -3,7 +3,7 @@ default: build: cmake -DCMAKE_BUILD_TYPE=Debug -B bld/ . make -j8 --dir bld/ - rm -rf ~/.cache/librepresenter/Libre\ Presenter/qmlcache/ + rm -rf ~/.cache/lumina/lumina/qmlcache/ run: RUST_LOG=debug ./bld/bin/lumina lint: diff --git a/src/qml/presenter/Slide.qml b/src/qml/presenter/Slide.qml index 4e9ff87..d1aef71 100644 --- a/src/qml/presenter/Slide.qml +++ b/src/qml/presenter/Slide.qml @@ -142,11 +142,25 @@ Item { source: imageSource === "" ? mpv : backgroundImage radius: blurRadius + Controls.Label { + text: Math.max(root.width, 1000) / 1000 * Math.max(root.textSize, 50) + horizontalAlignment: hTextAlignment + verticalAlignment: vTextAlignment + anchors.top: parent.top + anchors.left: parent.left + anchors.topMargin: 10 + anchors.bottomMargin: 10 + anchors.leftMargin: 10 + anchors.rightMargin: 10 + visible: RSettings.debug + } + Controls.Label { id: lyrics text: root.text + /* text: root.textSize */ /* text: root.width / 1000 * root.textSize */ - font.pixelSize: root.width / 1000 * root.textSize + font.pixelSize: Math.max(root.width, 1000) / 1000 * Math.max(root.textSize, 50) /* minimumPointSize: 5 */ fontSizeMode: Text.Fit font.family: chosenFont