From kde-commits Mon Jul 31 20:22:26 2017 From: Emmanuel Lepage Vallee Date: Mon, 31 Jul 2017 20:22:26 +0000 To: kde-commits Subject: [ring-kde/next] src/timeline/qml: HiDPI: Use the font metrics for the peers timeline delegate Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=150153255819657 Git commit eb8e5ff965afea399755c138e8f133ddee2ddbc5 by Emmanuel Lepage Vall= ee. Committed on 31/07/2017 at 16:35. Pushed by lepagevalleeemmanuel into branch 'next'. HiDPI: Use the font metrics for the peers timeline delegate M +4 -2 src/timeline/qml/contactmethoddelegate.qml M +8 -1 src/timeline/qml/peerstimeline.qml https://commits.kde.org/ring-kde/eb8e5ff965afea399755c138e8f133ddee2ddbc5 diff --git a/src/timeline/qml/contactmethoddelegate.qml b/src/timeline/qml/= contactmethoddelegate.qml index e773ac1a..d9fd71b3 100644 --- a/src/timeline/qml/contactmethoddelegate.qml +++ b/src/timeline/qml/contactmethoddelegate.qml @@ -25,6 +25,8 @@ Item { width: parent.width height: 50 = + property double pixmapHeight: 46 + Rectangle { id: highlight anchors.fill: parent @@ -40,8 +42,8 @@ Item { anchors.left: parent.left anchors.topMargin: 2 anchors.leftMargin: 2 - height: 46 - width: 46 + height: componentItem.pixmapHeight + width: componentItem.pixmapHeight Rectangle { radius: 5 color: "white" diff --git a/src/timeline/qml/peerstimeline.qml b/src/timeline/qml/peerstim= eline.qml index b2403740..e6828386 100644 --- a/src/timeline/qml/peerstimeline.qml +++ b/src/timeline/qml/peerstimeline.qml @@ -42,9 +42,16 @@ Rectangle { property alias overlayVisible: scrollBar.overlayVisible signal contactMethodSelected(var cm) = + FontMetrics { + id: fontMetrics + } + Component { id: contactDelegate - ContactMethodDelegate {} + ContactMethodDelegate { + height: 4*fontMetrics.height + pixmapHeight: 4*fontMetrics.height - 4 + } } = // To allow multiple places to set the contact method without knowing