[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [ring-kde/next] src/timeline/qml: HiDPI: Use the font metrics for the peers timeline delegate
From:       Emmanuel Lepage Vallee <null () kde ! org>
Date:       2017-07-31 20:22:26
Message-ID: E1dcHCs-0005G2-Fq () code ! kde ! org
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic