Introduce EnforcedPlainTextLabel, convert all Label or Text labels to use this
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Fri, 2 Dec 2022 13:51:09 +0000 (14:51 +0100)
committerallexzander <allexzander@users.noreply.github.com>
Mon, 5 Dec 2022 14:21:09 +0000 (15:21 +0100)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
27 files changed:
resources.qrc
src/gui/BasicComboBox.qml
src/gui/EmojiPicker.qml
src/gui/ErrorBox.qml
src/gui/PredefinedStatusButton.qml
src/gui/UserStatusSelector.qml
src/gui/UserStatusSelectorButton.qml
src/gui/filedetails/FileDetailsPage.qml
src/gui/filedetails/NCTabButton.qml
src/gui/filedetails/ShareDelegate.qml
src/gui/filedetails/ShareView.qml
src/gui/tray/ActivityActionButton.qml
src/gui/tray/ActivityItemContent.qml
src/gui/tray/ActivityList.qml
src/gui/tray/CallNotificationDialog.qml
src/gui/tray/EditFileLocallyLoadingDialog.qml
src/gui/tray/EnforcedPlainTextLabel.qml [new file with mode: 0644]
src/gui/tray/NCButtonContents.qml
src/gui/tray/NCToolTip.qml
src/gui/tray/SyncStatus.qml
src/gui/tray/TextButtonContents.qml
src/gui/tray/UnifiedSearchResultFetchMoreTrigger.qml
src/gui/tray/UnifiedSearchResultItem.qml
src/gui/tray/UnifiedSearchResultNothingFound.qml
src/gui/tray/UnifiedSearchResultSectionItem.qml
src/gui/tray/UserLine.qml
src/gui/tray/Window.qml

index 3132330e26cc77375ddf7b6002d6df97ba70114d..2c6f6a299aea293041403c8df7ae68305ad8562b 100644 (file)
@@ -46,6 +46,7 @@
         <file>src/gui/tray/EditFileLocallyLoadingDialog.qml</file>
         <file>src/gui/tray/NCBusyIndicator.qml</file>
         <file>src/gui/tray/NCToolTip.qml</file>
+        <file>src/gui/tray/EnforcedPlainTextLabel.qml</file>
         <file>theme/Style/Style.qml</file>
         <file>theme/Style/qmldir</file>
     </qresource>
index 8917260d3c9eefc25bf2e79848efdc1ba2484ed8..03a7ed8ad7b46d9c82ef2ae23f72722e3cdad176 100644 (file)
@@ -19,6 +19,7 @@ import QtQuick.Controls 2.15
 import QtGraphicalEffects 1.0
 
 import Style 1.0
+import "./tray"
 
 ComboBox {
     id: clearComboBox
@@ -31,7 +32,7 @@ ComboBox {
         opacity: clearComboBox.hovered ? Style.hoverOpacity : 1.0
     }
 
-    contentItem: Label {
+    contentItem: EnforcedPlainTextLabel {
         leftPadding: 0
         rightPadding: clearComboBox.indicator.width + clearComboBox.spacing
 
@@ -86,7 +87,7 @@ ComboBox {
     delegate: ItemDelegate {
         id: clearStatusDelegate
         width: clearComboBox.width
-        contentItem: Label {
+        contentItem: EnforcedPlainTextLabel {
             text: modelData.display
             textFormat: Text.PlainText
             color: Style.ncTextColor
index 5bff1924e9401555982944a027f1aa63f99a2876..bcc853fd5c8c132620913ecb3bd3560d4f6c66b3 100644 (file)
@@ -18,6 +18,7 @@ import QtQuick.Layouts 1.15
 
 import Style 1.0
 import com.nextcloud.desktopclient 1.0 as NC
+import "./tray"
 
 ColumnLayout {
     NC.EmojiModel {
@@ -54,7 +55,7 @@ ColumnLayout {
                 radius: Style.slightlyRoundedButtonRadius
             }
 
-            contentItem: Label {
+            contentItem: EnforcedPlainTextLabel {
                 horizontalAlignment: Text.AlignHCenter
                 verticalAlignment: Text.AlignVCenter
                 text: emoji
@@ -113,7 +114,7 @@ ColumnLayout {
                 radius: Style.slightlyRoundedButtonRadius
             }
 
-            contentItem: Label {
+            contentItem: EnforcedPlainTextLabel {
                 horizontalAlignment: Text.AlignHCenter
                 verticalAlignment: Text.AlignVCenter
                 text: modelData === undefined ? "" : modelData.unicode
@@ -126,7 +127,7 @@ ColumnLayout {
             }
         }
 
-        Label {
+        EnforcedPlainTextLabel {
             id: placeholderMessage
             width: parent.width * 0.8
             anchors.centerIn: parent
index 44bbc2983c2299af4d690dd2568b63c505e991d9..26ff0d4bce28c9f832857dc14add65681481f704 100644 (file)
@@ -3,6 +3,7 @@ import QtQuick.Layouts 1.15
 import QtQuick.Controls 2.15
 
 import Style 1.0
+import "./tray"
 
 Item {
     id: errorBox
@@ -42,7 +43,7 @@ Item {
 
         columns: 2
 
-        Label {
+        EnforcedPlainTextLabel {
             Layout.fillWidth: true
             color: Style.ncTextColor
             font.bold: true
@@ -64,7 +65,7 @@ Item {
             onClicked: errorBox.closeButtonClicked()
         }
 
-        Label {
+        EnforcedPlainTextLabel {
             id: errorMessage
 
             Layout.fillWidth: true
index 416f7e752a5b21d55c5de44f2159a8aa115d7756..27fc634f05ad2f0afbc2604684989032f157a4ff 100644 (file)
@@ -18,6 +18,7 @@ import QtQuick.Layouts 1.15
 import QtQuick.Controls 2.15
 
 import Style 1.0
+import "./tray"
 
 AbstractButton {
     id: root
@@ -42,7 +43,7 @@ AbstractButton {
     contentItem: Row {
         spacing: root.internalSpacing
 
-        Label {
+        EnforcedPlainTextLabel {
             width: root.emojiWidth > 0 ? root.emojiWidth : implicitWidth
             text: emoji
             textFormat: Text.PlainText
@@ -52,7 +53,7 @@ AbstractButton {
 
         Row {
             spacing: Style.smallSpacing
-            Label {
+            EnforcedPlainTextLabel {
                 text: root.statusText
                 textFormat: Text.PlainText
                 color: Style.ncTextColor
@@ -60,13 +61,13 @@ AbstractButton {
                 font.bold: true
             }
 
-            Label {
+            EnforcedPlainTextLabel {
                 text: "-"
                 color: Style.ncTextColor
                 verticalAlignment: Text.AlignVCenter
             }
 
-            Label {
+            EnforcedPlainTextLabel {
                 text: root.clearAtText
                 textFormat: Text.PlainText
                 color: Style.ncTextColor
index 489814956debc1f94acc84b089045307806a3ce0..51d80718cf84b6bfe727a178e797c3fb3e8e0e71 100644 (file)
@@ -20,6 +20,7 @@ import QtQuick.Window 2.15
 
 import com.nextcloud.desktopclient 1.0 as NC
 import Style 1.0
+import "./tray"
 
 ColumnLayout {
     id: rootLayout
@@ -32,7 +33,7 @@ ColumnLayout {
         Layout.fillWidth: true
         spacing: Style.smallSpacing
 
-        Label {
+        EnforcedPlainTextLabel {
             Layout.fillWidth: true
             Layout.bottomMargin: Style.smallSpacing
             horizontalAlignment: Text.AlignHCenter
@@ -117,7 +118,7 @@ ColumnLayout {
         Layout.fillHeight: true
         spacing: Style.smallSpacing
 
-        Label {
+        EnforcedPlainTextLabel {
             Layout.fillWidth: true
             Layout.bottomMargin: Style.smallSpacing
             horizontalAlignment: Text.AlignHCenter
@@ -273,7 +274,7 @@ ColumnLayout {
             Layout.fillWidth: true
             spacing: Style.smallSpacing
 
-            Label {
+            EnforcedPlainTextLabel {
                 id: clearComboLabel
 
                 Layout.fillWidth: true
index 91310839dea5043a28aa563e8fc59071ea07f869..286c89e587dbc59cf553df6ae06c0698ff562e7c 100644 (file)
@@ -19,6 +19,8 @@ import QtQuick.Controls 2.15
 
 import Style 1.0
 
+import "./tray"
+
 AbstractButton {
     id: root
 
@@ -59,7 +61,7 @@ AbstractButton {
             visible: root.icon.source !== ""
         }
 
-        Label {
+        EnforcedPlainTextLabel {
             Layout.column: root.icon.source === "" ? 0 : 1
             Layout.columnSpan: root.icon.source === "" ? 2 : 1
             Layout.row: 0
@@ -75,7 +77,7 @@ AbstractButton {
             font.bold: root.primary
         }
 
-        Label {
+        EnforcedPlainTextLabel {
             Layout.column: root.icon.source === "" ? 0 : 1
             Layout.columnSpan: root.icon.source === "" ? 2 : 1
             Layout.row: 1
index fc39825a3557ca5c0b88d8206a521ec18e80615f..aa3f4f488c6f9c2a5c15006b4bc5ade41afb9d89 100644 (file)
@@ -18,6 +18,7 @@ import QtQuick.Controls 2.15
 
 import com.nextcloud.desktopclient 1.0
 import Style 1.0
+import "../tray"
 
 Page {
     id: root
@@ -94,7 +95,7 @@ Page {
                 fillMode: Image.PreserveAspectFit
             }
 
-            Label {
+            EnforcedPlainTextLabel {
                 id: fileNameLabel
 
                 Layout.fillWidth: true
@@ -106,7 +107,7 @@ Page {
                 wrapMode: Text.Wrap
             }
 
-            Label {
+            EnforcedPlainTextLabel {
                 id: fileDetailsLabel
 
                 Layout.fillWidth: true
@@ -117,7 +118,7 @@ Page {
                 wrapMode: Text.Wrap
             }
 
-            Label {
+            EnforcedPlainTextLabel {
                 id: fileLockedLabel
 
                 Layout.fillWidth: true
index cd863cea846915b9f74434288df6e734cf28f35e..569569e63cb3a9d0906fa42ab806aafa454234e8 100644 (file)
@@ -19,6 +19,7 @@ import QtQuick.Controls 2.15
 
 import com.nextcloud.desktopclient 1.0
 import Style 1.0
+import "../tray"
 
 TabButton {
     id: tabButton
@@ -57,7 +58,7 @@ TabButton {
             }
         }
 
-        Label {
+        EnforcedPlainTextLabel {
             id: tabButtonLabel
             Layout.fillWidth: true
             horizontalAlignment: Text.AlignHCenter
index 613f40228d658896e4f5c86495c6af34e03492fc..885b78c6c6f42e619bfee611d6ca750aef536db1 100644 (file)
@@ -208,7 +208,7 @@ GridLayout {
         }
     }
 
-    Label {
+    EnforcedPlainTextLabel {
         id: shareTypeLabel
 
         Layout.fillWidth: true
@@ -222,7 +222,7 @@ GridLayout {
         elide: Text.ElideRight
     }
 
-    Label {
+    EnforcedPlainTextLabel {
         id: linkDetailLabel
 
         Layout.fillWidth: true
index 73e1636f3a0f650a407000caf0607d11a76ac176..ebb04d21cce4a36572981247b8b2324d66c6c3d4 100644 (file)
@@ -280,7 +280,7 @@ ColumnLayout {
             anchors.right: parent.right
             anchors.verticalCenter: parent.verticalCenter
 
-            Label {
+            EnforcedPlainTextLabel {
                 id: sharingDisabledLabel
                 width: parent.width
                 text: qsTr("Sharing is disabled")
@@ -289,7 +289,7 @@ ColumnLayout {
                 horizontalAlignment: Text.AlignHCenter
                 verticalAlignment: Text.AlignVCenter
             }
-            Label {
+            EnforcedPlainTextLabel {
                 width: parent.width
                 text: qsTr("This item cannot be shared.")
                 color: Style.ncSecondaryTextColor
@@ -298,7 +298,7 @@ ColumnLayout {
                 verticalAlignment: Text.AlignVCenter
                 visible: !root.shareModel.canShare
             }
-            Label {
+            EnforcedPlainTextLabel {
                 width: parent.width
                 text: qsTr("Sharing is disabled.")
                 color: Style.ncSecondaryTextColor
index 6693153b77debad838bf87725cec87e2e901a0b7..250da5ab99107df1ae4a1297fb102f2bdbbf2da9 100644 (file)
@@ -40,7 +40,7 @@ AbstractButton {
         text: root.toolTipText
         delay: Qt.styleHints.mousePressAndHoldInterval
         visible: root.toolTipText !== "" && root.hovered
-        contentItem: Label {
+        contentItem: EnforcedPlainTextLabel {
             text: customTextButtonTooltip.text
             color: Style.ncTextColor
         }
index 80bc931fc7460bf728290d9e6fe770f60c421733..c817be54b646c6ca5986fffb70717452977808bf 100644 (file)
@@ -120,7 +120,7 @@ RowLayout {
 
         spacing: Style.activityContentSpace
 
-        Label {
+        EnforcedPlainTextLabel {
             id: activityTextTitle
             text: (root.activityData.type === "Activity" || root.activityData.type === "Notification") ? root.activityData.subject : root.activityData.message
             height: (text === "") ? 0 : implicitHeight
@@ -134,7 +134,7 @@ RowLayout {
             visible: text !== ""
         }
 
-        Label {
+        EnforcedPlainTextLabel {
             id: activityTextInfo
             text: (root.activityData.type === "Sync") ? root.activityData.displayPath
                                     : (root.activityData.type === "File") ? root.activityData.subject
@@ -151,7 +151,7 @@ RowLayout {
             visible: text !== ""
         }
 
-        Label {
+        EnforcedPlainTextLabel {
             id: activityTextDateTime
             text: root.activityData.dateTime
             height: (text === "") ? 0 : implicitHeight
@@ -165,7 +165,7 @@ RowLayout {
             visible: text !== ""
         }
 
-        Label {
+        EnforcedPlainTextLabel {
             id: talkReplyMessageSent
             text: root.activityData.messageSent
             height: (text === "") ? 0 : implicitHeight
index 97c4a5f5d6ed22c74ef2ea174e258b8754dd11fb..995d225b28e878f6bc7f7a1603cfa07e12b43a73 100644 (file)
@@ -107,7 +107,7 @@ ScrollView {
                 source: "image://svgimage-custom-color/activity.svg/" + Style.ncSecondaryTextColor
             }
 
-            Label {
+            EnforcedPlainTextLabel {
                width: parent.width
                text: qsTr("No activities yet")
                color: Style.ncSecondaryTextColor
index d53daf7bc36104996cdc74fe53447a0764f05964..6f54712c89d37c683a001e6c1fa3f4efc047957b 100644 (file)
@@ -192,7 +192,7 @@ Window {
                 }
             }
 
-            Label {
+            EnforcedPlainTextLabel {
                 id: message
                 text: root.subject
                 textFormat: Text.PlainText
index 12e8f757b4bb514f28b5b1ed76c3413818bc10c6..d0a50614ad3c2418c5a3d87d799f4adc9e6f8e55 100644 (file)
@@ -55,7 +55,7 @@ Window {
             color: Style.ncTextColor
             running: true
         }
-        Label {
+        EnforcedPlainTextLabel {
             id: labelFileName
             Layout.alignment: Qt.AlignHCenter
             Layout.fillWidth: true
@@ -67,7 +67,7 @@ Window {
             horizontalAlignment: Text.AlignHCenter
             visible: root.fileName !== ""
         }
-        Label {
+        EnforcedPlainTextLabel {
             id: labelMessage
             Layout.alignment: Qt.AlignHCenter
             Layout.fillWidth: true
diff --git a/src/gui/tray/EnforcedPlainTextLabel.qml b/src/gui/tray/EnforcedPlainTextLabel.qml
new file mode 100644 (file)
index 0000000..f47692c
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2022 by Claudio Cambra <claudio.cambra@nextcloud.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+
+Label {
+    function resetToPlainText() {
+        if (textFormat !== Text.PlainText) {
+            console.log("WARNING: this label was set to a non-plain text format. Resetting to plain text.")
+            textFormat = Text.PlainText;
+        }
+    }
+
+    textFormat: Text.PlainText
+    onTextFormatChanged: resetToPlainText()
+    Component.onCompleted: resetToPlainText()
+}
index 2ca45fd191c0af0864bda9c996bce2d521fb16d0..5144d58b39d0c66ad68957967646970040417a02 100644 (file)
@@ -42,7 +42,7 @@ RowLayout {
         visible: root.hovered ? root.imageSourceHover !== "" : root.imageSource !== ""
     }
 
-    Label {
+    EnforcedPlainTextLabel {
         id: buttonLabel
 
         Layout.fillWidth: true
index 2c1b85312374387ffc68c3ca45835b7a5bd28ffd..af43d5727a4b542ecc7e9ded50ddb54615784b8d 100644 (file)
@@ -22,7 +22,7 @@ ToolTip {
     id: toolTip
     clip: true
     delay: Qt.styleHints.mousePressAndHoldInterval
-    contentItem: Label {
+    contentItem: EnforcedPlainTextLabel {
         text: toolTip.text
         textFormat: Text.PlainText
         color: Style.ncTextColor
index 55da5589ba9a8cac3a63c97200f6be021dfd0ee8..b0828f1957323a982a45d785690f174c718d034f 100644 (file)
@@ -47,7 +47,7 @@ RowLayout {
         Layout.fillWidth: true
         Layout.fillHeight: true
 
-        Text {
+        EnforcedPlainTextLabel {
             id: syncProgressText
 
             Layout.fillWidth: true
@@ -87,7 +87,7 @@ RowLayout {
             }
         }
 
-        Text {
+        EnforcedPlainTextLabel {
             id: syncProgressDetailText
 
             Layout.fillWidth: true
index 8699faa350a47fd3f756539355420726c8bd8074..15b77b272593ce3323efa1d935eecc77cbe4e9b5 100644 (file)
@@ -18,7 +18,7 @@ import QtQuick.Layouts 1.15
 
 import Style 1.0
 
-Label {
+EnforcedPlainTextLabel {
     property bool hovered: false
     property color textColor: Style.ncTextColor
     property color textColorHovered: Style.ncSecondaryTextColor
index 65600e33dc52dc3c0cf25c931df94d706b2e318c..51b88718b727a5ca4aee923985d0b1506c2d6ab0 100644 (file)
@@ -18,7 +18,7 @@ ColumnLayout {
     Accessible.name: unifiedSearchResultItemFetchMoreText.text
     Accessible.onPressAction: unifiedSearchResultMouseArea.clicked()
 
-    Label {
+    EnforcedPlainTextLabel {
         id: unifiedSearchResultItemFetchMoreText
 
         Layout.fillWidth: true
index 87cd4eace3039b39b08e82121e21a68399612122..3876a1c8bce4b4e4ef6d0c4fdd50904fa5bcb14e 100644 (file)
@@ -86,7 +86,7 @@ RowLayout {
         Layout.rightMargin: Style.trayHorizontalMargin
         spacing: Style.standardSpacing
 
-        Label {
+        EnforcedPlainTextLabel {
             id: unifiedSearchResultTitleText
             Layout.fillWidth: true
             text: unifiedSearchResultItemDetails.title.replace(/[\r\n]+/g, " ")
@@ -95,7 +95,7 @@ RowLayout {
             font.pixelSize: unifiedSearchResultItemDetails.titleFontSize
             color: unifiedSearchResultItemDetails.titleColor
         }
-        Label {
+        EnforcedPlainTextLabel {
             id: unifiedSearchResultTextSubline
             Layout.fillWidth: true
             text: unifiedSearchResultItemDetails.subline.replace(/[\r\n]+/g, " ")
index 35166e81eafa0d650b49818087eeb80bd1dcd0c0..d73e8d352a89daa52c9853842ba027c75cb32879 100644 (file)
@@ -21,7 +21,7 @@ ColumnLayout {
         Layout.alignment: Qt.AlignHCenter
     }
 
-    Label {
+    EnforcedPlainTextLabel {
         id: unifiedSearchResultsNoResultsLabel
         text: qsTr("No results for")
         color: Style.menuBorder
@@ -32,7 +32,7 @@ ColumnLayout {
         horizontalAlignment: Text.AlignHCenter
     }
 
-    Label {
+    EnforcedPlainTextLabel {
         id: unifiedSearchResultsNoResultsLabelDetails
         text: unifiedSearchResultNothingFoundContainer.text
         textFormat: Text.PlainText
index e310effa1f3d6895287668b86e450645328746c7..4e7da57d65f00bfad3150c2a6d894aa3b11ef7b5 100644 (file)
@@ -5,7 +5,7 @@ import QtQuick.Layouts 1.2
 import Style 1.0
 import com.nextcloud.desktopclient 1.0
 
-Label {
+EnforcedPlainTextLabel {
     required property string section
 
     topPadding: Style.unifiedSearchResultSectionItemVerticalPadding
index 4127faf840968ed68af21a174aef415833af392a..9c290d36f79d907e01059e12d58a45bbe965b460 100644 (file)
@@ -71,7 +71,7 @@ AbstractButton {
             Layout.fillWidth: true\r
             Layout.fillHeight: true\r
 \r
-            Label {\r
+            EnforcedPlainTextLabel {\r
                 id: accountUser\r
                 Layout.fillWidth: true\r
                 Layout.alignment: Qt.AlignLeft | Qt.AlignBottom\r
@@ -92,7 +92,7 @@ AbstractButton {
                          model.serverHasUserStatus &&\r
                          (model.statusEmoji !== "" || model.statusMessage !== "")\r
 \r
-                Label {\r
+                EnforcedPlainTextLabel {\r
                     id: emoji\r
                     visible: model.statusEmoji !== ""\r
                     text: statusEmoji\r
@@ -100,7 +100,7 @@ AbstractButton {
                     topPadding: -Style.accountLabelsSpacing\r
                 }\r
 \r
-                Label {\r
+                EnforcedPlainTextLabel {\r
                     id: message\r
                     Layout.fillWidth: true\r
                     visible: model.statusMessage !== ""\r
@@ -113,7 +113,7 @@ AbstractButton {
                 }\r
             }\r
 \r
-            Label {\r
+            EnforcedPlainTextLabel {\r
                 id: accountServer\r
                 Layout.fillWidth: true\r
                 Layout.alignment: Qt.AlignLeft | Qt.AlignTop\r
index 16d4fe0127eb492c679a0c34e9d1506058fc7f6f..885180e450cfee3999c3b81791c89af4b5e3654a 100644 (file)
@@ -277,7 +277,7 @@ ApplicationWindow {
                                     sourceSize.width: Style.headerButtonIconSize\r
                                     sourceSize.height: Style.headerButtonIconSize\r
                                 }\r
-                                Label {\r
+                                EnforcedPlainTextLabel {\r
                                     Layout.leftMargin: 14\r
                                     text: qsTr("Add account")\r
                                     color: Style.ncTextColor\r
@@ -446,7 +446,7 @@ ApplicationWindow {
                             Layout.fillWidth: true\r
                             Layout.maximumWidth: parent.width\r
 \r
-                            Label {\r
+                            EnforcedPlainTextLabel {\r
                                 id: currentAccountUser\r
                                 Layout.alignment: Qt.AlignLeft | Qt.AlignBottom\r
                                 width: Style.currentAccountLabelWidth\r
@@ -466,14 +466,14 @@ ApplicationWindow {
                                 spacing: Style.accountLabelsSpacing\r
                                 width: parent.width\r
 \r
-                                Label {\r
+                                EnforcedPlainTextLabel {\r
                                     id: emoji\r
                                     visible: UserModel.currentUser.statusEmoji !== ""\r
                                     width: Style.userStatusEmojiSize\r
                                     text: UserModel.currentUser.statusEmoji\r
                                     textFormat: Text.PlainText\r
                                 }\r
-                                Label {\r
+                                EnforcedPlainTextLabel {\r
                                     id: message\r
                                     Layout.alignment: Qt.AlignLeft | Qt.AlignBottom\r
                                     Layout.fillWidth: true\r