Merge pull request #1572 from Nheko-Reborn/differentiateTouch

Qt 6.4 properly supports scrolling text with touch
This commit is contained in:
DeepBlueV7.X 2023-10-01 12:55:36 +00:00 committed by GitHub
commit 79a32bea50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 20 deletions

View file

@ -2,9 +2,9 @@
// //
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick 2.5 import QtQuick
import QtQuick.Controls 2.3 import QtQuick.Controls
import im.nheko 1.0 import im.nheko
TextEdit { TextEdit {
id: r id: r
@ -28,7 +28,6 @@ TextEdit {
color: palette.text color: palette.text
focus: false focus: false
readOnly: true readOnly: true
selectByMouse: !Settings.mobileMode
textFormat: TextEdit.RichText textFormat: TextEdit.RichText
wrapMode: Text.Wrap wrapMode: Text.Wrap

View file

@ -3,8 +3,8 @@
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
import ".." import ".."
import QtQuick.Controls 2.3 import QtQuick.Controls
import im.nheko 1.0 import im.nheko
MatrixText { MatrixText {
required property string body required property string body
@ -42,8 +42,8 @@ MatrixText {
width: parent?.width ?? 0 width: parent?.width ?? 0
height: !keepFullText ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : implicitHeight height: !keepFullText ? Math.round(Math.min(timelineView.height / 8, implicitHeight)) : implicitHeight
clip: !keepFullText clip: !keepFullText
selectByMouse: !Settings.mobileMode && !isReply selectByMouse: !isReply
enabled: !Settings.mobileMode // enabled: !Settings.mobileMode
font.pointSize: (Settings.enlargeEmojiOnlyMessages && isOnlyEmoji > 0 && isOnlyEmoji < 4) ? Settings.fontSize * 3 : Settings.fontSize font.pointSize: (Settings.enlargeEmojiOnlyMessages && isOnlyEmoji > 0 && isOnlyEmoji < 4) ? Settings.fontSize * 3 : Settings.fontSize
NhekoCursorShape { NhekoCursorShape {

View file

@ -2,9 +2,9 @@
// //
// SPDX-License-Identifier: GPL-3.0-or-later // SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import im.nheko 1.0 import im.nheko
ApplicationWindow { ApplicationWindow {
id: rawMessageRoot id: rawMessageRoot
@ -32,7 +32,6 @@ ApplicationWindow {
font: Nheko.monospaceFont() font: Nheko.monospaceFont()
color: palette.text color: palette.text
readOnly: true readOnly: true
selectByMouse: !Settings.mobileMode
textFormat: Text.PlainText textFormat: Text.PlainText
anchors.fill: parent anchors.fill: parent

View file

@ -208,7 +208,6 @@ ApplicationWindow {
: (roomSettings.plainRoomTopic === "" ? ("<i>" + qsTr("No topic set") + "</i>") : roomSettings.roomTopic) : (roomSettings.plainRoomTopic === "" ? ("<i>" + qsTr("No topic set") + "</i>") : roomSettings.roomTopic)
wrapMode: TextEdit.WordWrap wrapMode: TextEdit.WordWrap
background: null background: null
selectByMouse: !Settings.mobileMode
color: palette.text color: palette.text
horizontalAlignment: TextEdit.AlignHCenter horizontalAlignment: TextEdit.AlignHCenter
onLinkActivated: Nheko.openLink(link) onLinkActivated: Nheko.openLink(link)

View file

@ -5,12 +5,12 @@
pragma ComponentBehavior: Bound pragma ComponentBehavior: Bound
import ".." import ".."
import "../ui" import "../ui"
import Qt.labs.platform 1.1 as Platform import Qt.labs.platform as Platform
import QtQuick 2.15 import QtQuick
import QtQuick.Controls 2.15 import QtQuick.Controls
import QtQuick.Layouts 1.2 import QtQuick.Layouts
import QtQuick.Window 2.15 import QtQuick.Window
import im.nheko 1.0 import im.nheko
Rectangle { Rectangle {
id: userSettingsDialog id: userSettingsDialog
@ -163,7 +163,6 @@ Rectangle {
color: palette.text color: palette.text
text: model.value text: model.value
readOnly: true readOnly: true
selectByMouse: !Settings.mobileMode
textFormat: Text.PlainText textFormat: Text.PlainText
} }
} }