From 3225fb65fa6753e6843b55d53869ee70cb6b599d Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Tue, 23 Sep 2014 16:26:51 +0200 Subject: [PATCH] scale dependning on font size --- src/plugins/backends/snore/notification.qml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/backends/snore/notification.qml b/src/plugins/backends/snore/notification.qml index e1704c8..f8e5b08 100644 --- a/src/plugins/backends/snore/notification.qml +++ b/src/plugins/backends/snore/notification.qml @@ -4,8 +4,8 @@ import QtQuick.Window 2.2 Rectangle { id: root - width: Screen.width * 0.2 - height: Screen.height * 0.1 + width: body.font.pixelSize * 3 * 9 + height: body.font.pixelSize * 9 signal dismissed() @@ -33,7 +33,9 @@ Rectangle { animation.start() } - + + console.debug(width + "x" + height) + console.debug(body.maximumLineCount) } NumberAnimation{ @@ -82,7 +84,7 @@ Rectangle { anchors.left: image.right anchors.leftMargin: 5 wrapMode: Text.WordWrap - maximumLineCount: root.height / font.pointSize + maximumLineCount: root.height / font.pixelSize - 3 onLinkActivated: Qt.openUrlExternally(link) }