mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 04:28:49 +03:00
Qt 6.4 properly supports scrolling text with touch
This commit is contained in:
parent
03be9e479a
commit
879ef31fcf
5 changed files with 16 additions and 20 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue