3 files changed, 12 insertions, 12 deletions
diff --git a/resources/qml/ScrollHelper.qml b/resources/qml/ScrollHelper.qml
index 669d9608..3a8868f5 100644
--- a/resources/qml/ScrollHelper.qml
+++ b/resources/qml/ScrollHelper.qml
@@ -22,7 +22,7 @@ import QtQuick.Controls 2.12
/*
* Shamelessly stolen from:
-* https://gitlab.com/spectral-im/spectral/-/blob/master/imports/Spectral/Component/ScrollHelper.qml
+* https://cgit.kde.org/kube.git/tree/framework/qml/ScrollHelper.qml
*
* The MouseArea + interactive: false + maximumFlickVelocity are required
* to fix scrolling for desktop systems where we don't want flicking behaviour.
@@ -42,13 +42,14 @@ MouseArea {
z: -1
onFlickableChanged: {
if (enabled) {
- flickable.interactive = false
flickable.maximumFlickVelocity = 100000
flickable.boundsBehavior = Flickable.StopAtBounds
root.parent = flickable
}
}
+ acceptedButtons: Qt.NoButton
+
function calculateNewPosition(flickableItem, wheel) {
//Nothing to scroll
if (flickableItem.contentHeight < flickableItem.height) {
diff --git a/resources/qml/TimelineView.qml b/resources/qml/TimelineView.qml
index 7a1bba1d..739da5f0 100644
--- a/resources/qml/TimelineView.qml
+++ b/resources/qml/TimelineView.qml
@@ -114,7 +114,6 @@ Page {
model: timelineManager.timeline
boundsBehavior: Flickable.StopAtBounds
- pixelAligned: true
ScrollHelper {
flickable: parent
@@ -208,10 +207,8 @@ Page {
text: chat.model.formatDateSeparator(modelData.timestamp)
color: colors.brightText
- leftPadding: 24
- rightPadding: 24
- topPadding: 8
- bottomPadding: 8
+ height: fontMetrics.height * 1.4
+ width: contentWidth * 1.2
horizontalAlignment: Text.AlignHCenter
background: Rectangle {
@@ -221,7 +218,7 @@ Page {
}
Row {
height: userName.height
- spacing: 4
+ spacing: 4
Avatar {
width: avatarSize
height: avatarSize
@@ -327,4 +324,8 @@ Page {
}
}
}
+
+ FontMetrics {
+ id: fontMetrics
+ }
}
diff --git a/resources/qml/delegates/Pill.qml b/resources/qml/delegates/Pill.qml
index a912b9b1..c4260c33 100644
--- a/resources/qml/delegates/Pill.qml
+++ b/resources/qml/delegates/Pill.qml
@@ -5,10 +5,8 @@ Label {
color: colors.brightText
horizontalAlignment: Text.AlignHCenter
- leftPadding: 24
- rightPadding: 24
- topPadding: 8
- bottomPadding: 8
+ height: fontMetrics.height * 1.4
+ width: contentWidth * 1.2
background: Rectangle {
radius: parent.height / 2
|