From 5c1e67f3b61f3473babe3c68702796de1b42702d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Sat, 24 Feb 2024 23:20:12 +0800 Subject: [PATCH] update CodeExpander.qml --- example/qml-Qt6/component/CodeExpander.qml | 17 ++++++----------- example/qml/component/CodeExpander.qml | 17 ++++++----------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/example/qml-Qt6/component/CodeExpander.qml b/example/qml-Qt6/component/CodeExpander.qml index 2b7a7ff1..4b5cc035 100644 --- a/example/qml-Qt6/component/CodeExpander.qml +++ b/example/qml-Qt6/component/CodeExpander.qml @@ -12,21 +12,16 @@ FluExpander{ contentHeight:content.height focus: false - FluMultilineTextBox{ + FluCopyableText{ id:content width:parent.width - activeFocusOnTab: false - activeFocusOnPress: false - readOnly: true text:highlightQmlCode(code) textFormat: FluMultilineTextBox.RichText - KeyNavigation.priority: KeyNavigation.BeforeItem - background:Rectangle{ - radius: 4 - color:FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1) - border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1) - border.width: 1 - } + padding: 10 + topPadding: 10 + leftPadding: 10 + rightPadding: 10 + bottomPadding: 10 } FluIconButton{ diff --git a/example/qml/component/CodeExpander.qml b/example/qml/component/CodeExpander.qml index ca76fbcb..81fc1b45 100644 --- a/example/qml/component/CodeExpander.qml +++ b/example/qml/component/CodeExpander.qml @@ -12,21 +12,16 @@ FluExpander{ contentHeight:content.height focus: false - FluMultilineTextBox{ + FluCopyableText{ id:content width:parent.width - activeFocusOnTab: false - activeFocusOnPress: false - readOnly: true text:highlightQmlCode(code) textFormat: FluMultilineTextBox.RichText - KeyNavigation.priority: KeyNavigation.BeforeItem - background:Rectangle{ - radius: 4 - color:FluTheme.dark ? Qt.rgba(50/255,50/255,50/255,1) : Qt.rgba(247/255,247/255,247/255,1) - border.color: FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1) - border.width: 1 - } + padding: 10 + topPadding: 10 + leftPadding: 10 + rightPadding: 10 + bottomPadding: 10 } FluIconButton{