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 { Page {
property alias lazyLoad: generalForm.lazyLoad property alias lazyLoad: generalForm.lazyLoad
property alias asyncMessageDelegate: generalForm.asyncMessageDelegate property alias asyncMessageDelegate: generalForm.asyncMessageDelegate
property alias richText: generalForm.richText
property alias darkTheme: appearanceForm.darkTheme property alias darkTheme: appearanceForm.darkTheme
property alias miniMode: appearanceForm.miniMode property alias miniMode: appearanceForm.miniMode

View File

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

View File

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

View File

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