Add an option to use RichText instead of StyledText.

This fixes empty space issue at a cost of reduced performance.
This commit is contained in:
Black Hat 2018-08-18 17:56:55 +08:00
parent 3a7f182c52
commit 9f46bf8c42
4 changed files with 8 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import "form"
Page {
property alias lazyLoad: generalForm.lazyLoad
property alias asyncMessageDelegate: generalForm.asyncMessageDelegate
property alias richText: generalForm.richText
property alias darkTheme: appearanceForm.darkTheme
property alias miniMode: appearanceForm.miniMode

View File

@ -45,7 +45,7 @@ Rectangle {
wrapMode: Label.Wrap
linkColor: darkBackground ? "white" : Material.accent
textFormat: Text.StyledText
textFormat: setting.richText ? Text.RichText : Text.StyledText
onLinkActivated: Qt.openUrlExternally(link)
}

View File

@ -4,6 +4,7 @@ import QtQuick.Controls 2.2
Page {
property alias lazyLoad: lazyLoadSwitch.checked
property alias asyncMessageDelegate: asyncMessageDelegateSwitch.checked
property alias richText: richTextSwitch.checked
Column {
Switch {
@ -14,6 +15,10 @@ Page {
id: asyncMessageDelegateSwitch
text: "Force loading message delegates asynchronously"
}
Switch {
id: richTextSwitch
text: "Use RichText instead of StyledText"
}
Button {
text: "Invoke GC"

View File

@ -34,6 +34,7 @@ ApplicationWindow {
property alias lazyLoad: settingPage.lazyLoad
property alias asyncMessageDelegate: settingPage.asyncMessageDelegate
property alias richText: settingPage.richText
property alias darkTheme: settingPage.darkTheme
property alias miniMode: settingPage.miniMode